1 2 3 4 5 6 7 8 9 10 11 | // 2011_09_B_08 #include <stdio.h> int main() { int i, j; for(i=6; i>3; i--) j=i; printf("%d%d\n",i,j); return 0; } |
输出结果:34
1 2 3 4 5 6 7 8 9 10 11 12 13 | // 2011_09_B_09 #include <stdio.h> int main() { int i,n[]= {0,0,0,0,0}; for(i=1; i<=2; i++) { n[i]=n[i-1]*3+1; printf("%d",n[i]); } printf("\n"); return 0; } |
输出结果:14