题目内容

读程序,写出运行结果。#include int fac(int n){ int f=1,i;for(i=1;i<=n;i++)f=f * i;return(f);}main(){int j,s;scanf("%d",&j);s=fac(j);printf("%d!=%d\n",j,s);}如果从键盘输入2, 运行结果为_____________________

查看答案
更多问题

读程序,写出运行结果。#includemain( ){ints=0,a=5,n;scanf("%d",&n);do{s+=1;a=a-2;}while(a!=n);printf("%d,%d\n",s,a);}若输入的值1,运行结果为: _________________

读程序,写出运行结果。#include main( ){ int sum=20,n=1;while(n<3) {sum=sum-n; n++; }printf(“%d,%d”,n,sum);}运行结果为:_________________

读程序,写出运行结果。void main(){inti;char c;i='A';c=65;printf("%c,%d\n",c,c);printf("%c,%d\n",i,i);}运行结果为: _________________

读程序,写出运行结果。#includevoid main(){int a[10]={1,2,3,4,5,6,7,8,9,10};int i=0,sum=0;do{sum=sum+a[i];i++;}while(i<10);printf("%d",sum/i);}运行结果为:_________________

答案查题题库