Write a user-friendly c program to sum the individual digits of a integer n where input are taken from user. A typical execution is given below:
Answers
Answered by
0
Sum of digits in C. #include <stdio.h> int main() { int n, t, sum = 0, remainder; printf("Enter an integer\n"); scanf("%d", &n); t = n; while (t != 0)
Similar questions
Chemistry,
6 months ago
Math,
6 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
English,
1 year ago
Math,
1 year ago