C Program to calculate product of digits.
Sample Input 1 :
734
Sample Output 1 :
84 (7*3*4)
Flow Chart Design
Program or Solution
#include<stdio.h>
int main()
{
int num,sum;
scanf("%d",&num);
while(num!=0)
{
sum+=num%10;
num/=10;
}
printf("sum is %d",sum);
return 0;
}
Output

Program Explanation
refer video tutorialComments
Related Programs
- C Program to check whether the given digit is occurred in a Number
- C Program to count the occurence of digit
- C Program to find the first digit of a number
- C Program to Count the digits in the given number.
- C Program to calculate sum of digits.
- C Program to reverse the digits of an number
- C Program to check whether given Integer is Palindrome or Not
- C Program to check whether given Integer is Armstrong or Not
coming Soon
coming Soon