填空题
下列程序的功能是计算数的阶乘。
main()
iht i,n;
nlong np;
scanf("%d",&n);
np=
【11】
;
for(i=2;i<=n;i++)
【12】
;
printf("n=%d n!=%ld\n",n,np);
【参考答案】
[11] 1 [12] np*=i或np=np*i
点击查看答案
<上一题
目录
下一题>
热门
试题
填空题
若输入tc,则程序的运行结果为 【8】 。#include <stdio.h>main() char str[40]; fscanf(stdin, %s ,str); fprintf(stdout, %s n ,str);
点击查看答案
填空题
下列程序的运行结果为 【7】 。main() int i; char a[]= I love china! ,b[20],*p1,*p2; p1=a; p2=b; while(*p1) *p2=*p1; p1++; p2++; *p2=’ 0’;printf( string b is: %s n ,b);
点击查看答案
相关试题
请用位运算实现下述目标(设16位二进制数...
当输入19、2时,下列程序的运行结果为 ...