填空题

以下程序的功能是计算:s=1+12+123+1234+12345。请填空。
main()
int t=0,s=0,i;
for(i=1;i<=5;i++)
t=i+______;s=s+t;
printf("s=%d\n",s);

【参考答案】

t*10
<上一题 目录 下一题>
热门 试题

填空题
下列程序的输出结果是______。 #include<stdio.h> main() int x=1,y=1,a=1,b=1; switch(x) case 1: switch(y) case 0:a++;break; case 1:b++;break; case 2: a++;b++;break; printf( a=%d,b=%d n ,a,b);
填空题
有以下程序: main() char str[]= xyz , *ps=str; while(* ps)ps++; for(ps--; ps-str>=0;ps--)puts(ps); 执行后的输出结果是 。
相关试题
  • 下列程序的功能是:将输入的正整数按逆序输...
  • 下面程序的功能是将一个字符串str的内容倒...
  • 下列程序运行后的输出结果是______。...
  • 函数void fun(float *sn,int n)的功...
  • 设有定义: struct person int ID;cha...