题目内容

3-15运行时输入 3,输出为______ 。#include int main(){int n,i,j;scanf("%d",&n);for(i=0;i

查看答案
更多问题

3-16下列程序段的功能是计算:s=1+12+123+1234+12345,则画线处应填写____ 。#include int main(){int t=0,s=0,i;for(i=1;i<=5;i++){t=i+___;(数值在前,变量在后)s=s+t;}printf("s=%d\n",s);return 0;}

3-17以下程序段输入:7 10,输出结果是 _____ 。#include int main(){int m,n,s=0,i;scanf("%d%d",&m,&n);for(i=m;i<=n;i++){if(i

3-18以下程序段的输出结果是i= _____ ,s=_____。#include int main( ){int i, s=0;for(i=1;i<10;i++){s+=i*i;if(s>10) break;}printf("i=%d,s=%d\n",i,s);return 0;}

3-19 以下程序段的输出结果是 n=_____,s=_____ 。# include int main( ){int i, s=0, n=0;for(i=1; i<10; i++){if(i%2==0||i%3==0) continue;n++;s+=i;}printf("n=%d,s=%d\n",n,s);return 0;}

答案查题题库