#include<stdio.h> long fun(long num) { long k=1; do { k*=num%10; num/=10; } while(num>0); return k; } main() { long n; printf("please enter a number:"); scanf("%ld",&n); printf("\n%ld\n",fun(n)); }
P85
时间: 2024-11-05 22:53:46
#include<stdio.h> long fun(long num) { long k=1; do { k*=num%10; num/=10; } while(num>0); return k; } main() { long n; printf("please enter a number:"); scanf("%ld",&n); printf("\n%ld\n",fun(n)); }
P85