0
Hello, i need some help in c language
Calculate the amount and average value of the digits in a number. User input. I just can't include average value in this code #include <stdio.h> int main() { int n, s; printf("Enter number : "); scanf("%d",&n); s = 0; while (n > 0) { s += n%10; n /= 10; } printf("Sum of digit : %d\n",s); return 0; }
1 ответ
0
What have you tried so far?
Post your try.. Then some one help you to complete task..