coding-
#include<stdio.h>
#include<conio.h>
void main()
{
int x,r,s=0;
clrscr();
printf("Enter the numbers");
scanf("%d",&x);
while(x=0)
{
r=x%10;
s=s*10*r;
x=x/10;
printf("\n sum of=10",s);
}
getch();
}
OUTPUT-
Enter any value
123
sum of total digit=6
#include<stdio.h>
#include<conio.h>
void main()
{
int x,r,s=0;
clrscr();
printf("Enter the numbers");
scanf("%d",&x);
while(x=0)
{
r=x%10;
s=s*10*r;
x=x/10;
printf("\n sum of=10",s);
}
getch();
}
OUTPUT-
Enter any value
123
sum of total digit=6
Comments
Post a Comment
Please Subscribe and Comments my blog site.