Sunday, November 28, 2010

Write a C program to print Subtraction of the given two decimal number

#include

main()
{
int sub=0;
int n=0;
printf("Enter the value of n\n");
scanf("%d",&n);
while(n>0)
{
sub=n%10-sub;
n=n/10;
}
printf("Substraction of the n=%d\n",sub);
}