填空题

以下程序运行后的输出结果是______。
#include<stdio.h>
main()
 int i, n[]=0, 0, 0, 0, 0;
 for(i=1; i<=4; i++)
  n[i]=n[i-1] *3+1; printf("%d", n[i]);

【参考答案】

1 4 13 40
<上一题 目录 下一题>
热门 试题

填空题
以下程序运行后的输出结果是______。 main() int a=3,b=4,c=5,t=79; if(b<a&&a<c)t=a;a=c;c=t; if(a<c&&b<c)t=b;b=a;a=t; printf( %d%d%d n ,a,b,c);
填空题
下列程序的输出结果是______。 #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; case2: a++: b++; break; printf( a=%d,b=%d n ,a,b);
相关试题
  • 设有下列的程序段; char str[]= Hel...
  • 有以下程序: #include<stdio.h> fun...
  • 以下程序中,fun函数的功能是求3行4列二...
  • 以下程序的功能是:求出数组x中各相邻两个...
  • 以下程序的输出结果是 。 #include <s...