+ 1
Program to find the product of digits of any number. My program works correct except for one type of input like 09,08,03...
#include <stdio.h> int main() { int x,d,p=1,y; scanf("%d",&x); if(x==0) p=0; else while(x>0) { d=x%10; p=p*d; x=x/10; } printf("product is %d",p); return 0; }
1 Resposta
0
shouldnt It be a Double?