题目内容

以下程序的运行结果是____。#include main(){int i,j;for (i=4;i>=1;i--){printf("*");for (j=1;j<=4-i;j++)printf("*");printf("\n");}}

查看答案
更多问题

以下程序的运行结果是____。#include main(){int i,j,k;for (i=1;i<=6;i++){for (j=1;j<=20-2*i;j++)printf(" ");for (k=1;k<=i;k++)printf("%4d",i);printf("\n");}}

以下程序的运行结果是____。#include main(){int i,j,k;for (i=1;i<=6;i++){for (j=1;j<=20-3*i;j++)printf(" ");for (k=1;k<=i;k++)printf("%3d",k);for (k=i-1;k>0;k--)printf("%3d",k);printf("\n");}}

以下程序的运行结果是____。#include main(){int i,j,k;for (i=1;i<=4;i++){for (j=1;j<=20-3*i;j++)printf(" ");for (k=1;k<=2*i-1;k++)printf("%3s","*");printf("\n");}for (i=3;i>0;i--){for (j=1;j<=20-3*i;j++)printf(" ");for (k=1;k<=2*i-1;k++)printf("%3s","*");printf("\n");}}

下列语句段中不是死循环的是____。

A. i=100;while (1) { i=i%100+1; if (i==20) break; }
B. for (i=1;;i++) sum=sum+1;
C. k=0; do { ++k; } while (k<=0);
D. s=3379;while (s++%2+3%2)s++

答案查题题库