读下列程序,写出程序的运行结果。#includeint main(){int n=10;while (n>7){n--;printf("%d\n",n);}return 0;}输出:
查看答案
读下列程序,写出程序的运行结果。#includeint main(){int i,j;for(i=1;i<=4;i++){for(j=1;j<=4-i;j++)putchar(' ');for(j=1;j<=2*i-1;j++)printf("%c",'A'+j-1);putchar('\n');}return 0;}输出:
读下列程序,写出程序的运行结果。#includeint main(){int a,b;for(a=1,b=1;a<=100;a++){if(b>=20)break;if(b%3==1){b+=3;continue;}b-=5;}printf("%d\n",a);return 0;}输出:
读下列程序,写出程序的运行结果。#includeint main(){int n=0,fact=1,sum=0;do{n++;fact=fact*n;sum+=fact;} while (n<4);printf("%d\n",sum);return 0;}输出:
读下列程序,写出程序的运行结果。#includeint main(){int x=2, y=3, m, n;m = x++*5;n = ++y*5;printf ("%d,%d,%d,%d\n", x, y, m, n);return 0;}输出: