创建一个用户alex,uid为3400。这个用户的密码为redhat。
查看答案
float f(float x,int n){if(n==0) return 1;else return x*f(x , n-1);}main(){intn=5; float x=2.0;printf(〝%f〞,f(x,n)); }
A. 16.00000
B. 8.00000
C. 32.00000
D. 64.00000
#includedoublefact(intn){inti,s=1;for(i=1;i<=n;i++)s*=i;returns;}doublecal(intn){inti,sum=0;for(i=1;i<=n;i++)sum+=fact(i);returnsum;}intmain(){inti,n;doublesum=0;scanf("%d",&n);printf("%lf",cal(n));}程序运行时输入3,输出结果为_______________
A. 9.00000
B. 18.00000
C. 6.00000
D. 36.00000
longlongf(intn){if(n==1)return1;elsereturnn*f(n-1);}voidmain(){intn;scanf(“%d”,&n);printf(“%ld”,f(n));}程序运行时输入5,输出结果为_______
printn(int n){if(n>=0&&n<10)printf(“%d”,n);else{printf(“%d”,n%10);printn( n/10); }}main( ){int n;scanf(“%d”,&n);printn(n);}程序运行时输入2897,输出的结果为_____________