Write a program to input 10 different numbers. Calculate the sum and product of all the numbers display that sum and product 5 times?
please tell me fast and correct answer
Answers
Answered by
4
Answer:
The program output is also shown below.
* C program to accept an integer & find the sum of its digits.
long num, temp, digit, sum = 0;
printf("Enter the number \n");
scanf("%ld", &num);
temp = num;
while (num > 0)
digit = num % 10;
sum = sum + digit;
Answered by
0
Answer:
This program will read an integer number from the user and calculate the Sum and Product of all digits, in this program we will extract each digit by dividing and getting remainder with 10, add digits in Sum and Multiply the digit in Product.
Sum and Product of all digits of a Number using C program
HOPE THIS IS HELPFUL TO YOU
Similar questions