【填空题】下面程序的运行结果是 。#includemain(){inta=10,y=0;do{a+=2;y+=a;if(y>50)break;}while(a=14);printf("a=%dy=%d
",a,y);}
",a,y);}
举一反三
- 下面程序的运行结果是 #include int main() { int a,y; a=10; y=0; do{ a+=2; y+=a; if(y>50) break; }while(a=14); printf("a=%d y=%d\n",a,y); return 0; }
- 下面程序的运行结果是 #include"stdio.h" main() { int y,a; y=2; a=1; while(y--!=-1) do {a*=y;a++;} while(y--); printf(”%d,%d”,a,y); }
- 下面程序的运行结果是()。#include<stdio.h></Pmain(){inty=10;do{y--;}while(--y);printf("%d ",y--);}
- 阅读下列程序,写出运行结果 。#include <;stdio.h>;main ( ){ int x=1, y=10;if(x!=2) y=y+2;else y=y*2;printf("%d", y);}
- 【单选题】执行下面程序后,运行结果是() #include <stdio.h> main() { int x=41,y=1; if(x%3==0&&x%7==0) {y+=x; printf("y=%d ",y);} else {y=x; printf("y=%d",y);} } A. y=41 B. y=43 C. y=42 D. y=1