#include <stdio.h>
int main() {
int a,s,n,num;
printf("\nEter a digit no to sum there digit: ");
scanf("%d",&n);
num=n;
do{
a=n%10;
s=s+a;
n=n/10;
}
while(n>0);
printf("\n sum of individual digit of %d is %d",num,s);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: