#include<stdio.h>
int main()
{
int dummy,n,sum=0,x;
printf("Enter a number\n");
scanf("%d",&n);
dummy=n;
while(n>0)
{
x=n%10;
sum=sum+x;
n=n/10;
}
printf("The sum of all digits in %d is %d\n",dummy,sum);
return 0;
}
#include<stdio.h> int main() { char c; printf("Enter a character to know whether it is vowel or not\n"); scanf("...
No comments:
Post a Comment