Java

39
1277 reads

February 12, 2013

Number of Vowels in a word.


In this example we find number of vowels present in a word or a sentence.
We declare a string vowel, in which all vowels are stored.

33
391 reads

February 12, 2013

Search for 2D Number


The program below has a break statement which affects the innermost loop in which it is located.

55
1171 reads

February 12, 2013

Month from Number Using SwitchCase


The program below takes input from the user and displays the month according to the inputted number by the user.

27
1114 reads

February 12, 2013

String Concatenation


This example shows you that how to concatenate strings.

53
1133 reads

February 12, 2013

LetterGrade


The program below demonstrates the flow control of the given score of 92

36
1069 reads

February 12, 2013

Complex Arithmetic


More complicated arithmetic expressions can be written quite easily. The program below shows one example of combining the various operators in a more interesting calculation.

68
1179 reads

February 12, 2013

Prime Number Test


Prime number is a number which is divisible by one or by itself only.
In this example we check for any factors of number that are present between number and one.

27
1123 reads

February 12, 2013

Arithmethic ASCII Table


The program below prints the ASCII table.

38
1158 reads

February 12, 2013

The arithmetic sequence program


This example demonstrates a series where the difference of each term relative to the previous term is the same (i.e. discrete linear function), this program uses long as data type, in a SERIES.

23
1111 reads

February 12, 2013

Reversing and Counting Number of digits in a number


While-loop is a entry controlled loop.
It checks for test condition before entering the loop.
In this program, we check that if 'num' is not equal to 0.