主题:[讨论]C++考试题,烦请帮忙
以下程序实现下面功能:输出整数n的各位数字之积,请编写func函数。
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
long func( )
{
}
main()
{ long n;
printf(“\nPlease enter a number:”);
scanf(“%ld”,&n);
printf(“\nThe product of its digits is %ld.”,func(n));
}
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
long func( )
{
}
main()
{ long n;
printf(“\nPlease enter a number:”);
scanf(“%ld”,&n);
printf(“\nThe product of its digits is %ld.”,func(n));
}