#include <stdio.h>
int fac(int n)
{int c;
printf("now the number is %d ",n); //1
getchar(); //one
if(n==1 || n==0) c=1;
else
c=n*fac(n-1);
printf("now the number is %d and the %d! is %d",n,n,c); //2
getchar(); //two
return c;}
void main()
{
int n=4;
printf("result is %d.\n",fac(n)); }
表示两次输入
如果是输入的话格式应该是:变量名=getchar();
我觉得是没用的,删掉就好