Program to print product of digit using while loop in C-language
Get link
Facebook
X
Pinterest
Email
Other Apps
-
#include<stdio.h>
int main()
{
int n,a,p=1;
printf("Enter the number\n");
scanf("%d",&n);
while(n!=0)
{
a=n%10;
n=n/10;
p=p*a;
}
printf("Product of digit=%d",p);
}
Comments
Post a Comment