19 August, 2012

## Display prime numbers

The program shows how to display prime numbers. Here two for loops are used. A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. A natural number greater than 1 that is not a prime number is called a composite number. For example, 5 is prime, as only 1 and 5 divide it, whereas 6 is composite, since it has the divisors 2 and 3 in addition to 1 and 6.Read More

27 July, 2012

## Displaying number series

1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 The program shows the displaying of above series. The program shows the displaying of above series. The program shows the displaying of above series. The program shows the displaying of above series. The program shows the displaying of above series. The program shows the displaying of above series.Read More

27 July, 2012

## Palindrome of a string

The below program shows a string is palindrome or not. This is done using string functions. string copy and string reverse functions are used to check a word palindrome or not. mom is a palindrome. car is not a palindrome. Here the entered string is copied into another variable and reverse of this string is compared with original string, to get a palindrome Read More

27 July, 2012

## Reverse of the number

The program shows the reverse of a number. For example take the number as 6735, the reverse of the number shows 5376 as output.The program shows the reverse of a number. For example take the number as 6735, the reverse of the number shows 5376 as output.The program shows the reverse of a number. For example take the number 6735Read More

27 July, 2012

## Write a program to tell the alphabet is vowel or not

Program shows that the alphabet is vowel or not. Switch case is used in this program. If any character is entered by user the program tells that number is vowel or consonent, and it gives output. Program shows that the alphabet is vowel or not. Switch case is used in this program. If any character is entered by user Read More

27 July, 2012

## Sum of digits in a number

The program shows how to calculate sum of digits in a number. For example take the number as 345 then sum of digits is 12.The program shows how to calculate sum of digits in a number. For example take the number as 345 then sum of digits is 12.The program shows how to calculate sum of digits in a number. For example take the number as 345 then sum of digits is 12.Read More

27 July, 2012

## Checking a number palindrome or not

The program shows how to check a number palindrome or not. Palindrome means a number if read from right to left or left to right will be same. Foe example 454 number value will be same if read from right to left or left to right. 675 is not a palindrome.The program shows how to check a number palindrome or not without using string functionRead More

27 July, 2012

## Sum of cubes of n numbers

The program shows sum of cubes of n numbers. By using the formula (n^2)*((n+1)^2)/4 sum of cubes of a number can be calculated. 1^3+2^3+3^3......The program shows sum of cubes of n numbers. By using the formula (n^2)*((n+1)^2)/4 sum of cubes of a number can be calculated. 1^3+2^3+3^3......The program shows sum of cubes of n numbers. Read More