Tuesday, 28 October 2014

What is a Palindrome Number? Checking whether a number is palindrome or not !

Palindrome

A number which is read from both sides but doesn't make change called a palindrome number
.
just like word "MADAM" you can read this word from both sides the outcome will always MADAM.

This situation can also be in Integer number that called palindrome number.  
 For Ex.
               121

Adding all digit of a Given Number in C

Input = 123456
output = 21                                  //(1+2+3+4+5+6)
To add all digits of number we will simply write a loop and just take the last digit from the given number and remove one digit from the given number. The loop will continues till the number is greater than 0.

To do this we will use the while loop.

How To Enter A Number And Reverse it in C


Input -   123456
Output - 654321

#include<stdio.h>

void main()
{

Saturday, 4 October 2014

Adding two Numbers




To add two numbers we will simply just create three variables, two for  the numbers and one for the result. See example






         int main()

Creating Variables & Data types

Variables 

Constant are the term that can not be changed at the time of program execution some time we need to change the value of variable so we use variables in this condition.

Variables are nothing just given name to the particular space of our memory.