C Program for Infix to Prefix Conversion

Saturday, June 9th, 2012  »  Posted By  »  Total 4 Comments

C Program for Infix to Prefix Conversion. Source: Dr. G T Raju, Professor & Head, Dept. of CSE, RNSIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 […]

Verilog HDL Program for D Flip Flop

Simulated waveform for D Flip Flop Saturday, June 9th, 2012  »  Posted By  »  Total 1 Comment

A flip-flop or latch is a circuit that has two stable states and can be used to store state information. The circuit can be made to change state by signals applied to one or more control inputs and will have one or two outputs. It is the basic storage element in sequential logic. Flip-flops and […]

How to align or format codes in Visual Studio?

Thursday, August 11th, 2011  »  Posted By  »  Total 1 Comment

This is very simple in Visual Studio. Follow the below steps. Select the code you want to re-format. Press Ctrl-K Press Ctrl-F The key combination Ctrl-K + Ctrl-F only works on selected text, so make sure you select the code you want to re-format before using it. You can easily reformat the entire code by […]

Java program to display triangle 1 24 369 481216

Saturday, February 5th, 2011  »  Posted By  »  Total 1 Comment

/* Display Triangle as follow 1 2 4 3 6 9 4 8 12 16 … N (indicates no. of Rows) */ class Output3{ public static void main(String args[]){ int n = Integer.parseInt(args[0]); for(int i=1;i

Java program to display triangle 0 10 101 0101

Saturday, February 5th, 2011  »  Posted By  »  Total 5 Comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /* Display Triangle as follow 0 1 0 1 0 1 0 1 0 1 */ class Output2{ public static void main(String args[]){ for(int i=1;i<=4;i++){ for(int j=1;j<=i;j++){ System.out.print(((i+j)%2)+" "); } System.out.print("\n"); } } }

Java program to display triangle 1 23 456 78910

Saturday, February 5th, 2011  »  Posted By  »  Total 3 Comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 /* Display Triangle as follow : BREAK DEMO. 1 2 3 4 5 6 7 8 9 10 … N */ class Output1{ public static void main(String args[]){ int c=0; int n = […]

Java program to find average of consecutive N Odd no. and Even no.

Saturday, February 5th, 2011  »  Posted By  »  Total 0 Comment

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 class EvenOdd_Avg{ public static void main(String args[]){ int n = Integer.parseInt(args[0]); int cntEven=0,cntOdd=0,sumEven=0,sumOdd=0; while(n > 0){ if(n%2==0){ cntEven++; sumEven = sumEven + n; } else{ cntOdd++; sumOdd = sumOdd + n; } n–; […]

Java program to generate Harmonic Series 1 + 1/2 + 1/3 + 1/4 + 1/5

Saturday, February 5th, 2011  »  Posted By  »  Total 6 Comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /* Write a program to generate Harmonic Series. Example : Input – 5 Output – 1 + 1/2 + 1/3 + 1/4 + 1/5 = 2.28 (Approximately) */ class HarmonicSeries{ public static void main(String args[]){ int num = Integer.parseInt(args[0]); double […]

Java program to demonstrate switch case

Saturday, February 5th, 2011  »  Posted By  »  Total 2 Comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 […]

Java program to find whether no. is palindrome or not

Saturday, February 5th, 2011  »  Posted By  »  Total 21 Comments

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 /* Write a program to find whether no. is palindrome or not. Example : Input – 12521 is a palindrome no. Input – 12345 is not a palindrome no. */ class Palindrome{ public static void […]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: