#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
时间: 2025-01-10 19:30:53
#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