write a C program to calculate the sum of its digits
write a C program to calculate the sum of its digits
c program to sum of digits of a 5 digit number Problem Statement: If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits. Answer: /* Sum of digits of a 5 digit number*/ #include #include main() { int num,a,n; int sum=0; /* this has been initialised to zero otherwise it will contain a garbage value */ clrscr(); print(“\n Enter a 5 digit number less…
View On WordPress













