阅读下列程序,写出运行结果。#includemain(){intx=1,y=10;if(x!=2)y=y+2;elsey=y*2;printf("%d\n",y);}
查看答案
若从键盘上输入48,然后按回车键,则程序执行后的运行结果是。#includemain(){intx;scanf("%d",&x);if(x>50)printf("%d,",x);if(x>40)printf("%d,",x);if(x>30)printf("%d,",x);}
阅读下列程序,写出运行结果。#includemain(){inti=10;switch(i){case9:i+=1;case10:i+=1;case11:i+=1;default:i+=1;}printf("%d\n",i)
阅读下列程序,写出运行结果。#includemain(){inta=1,b=0;switch(a){case1:switch(b){case0:printf("0");break;case1:printf("1");break;}case2:printf("2");break;}}
(改)以下程序,执行后输出结果为___________。#include "stdio.h"main(){inta=1,b=2,c=3,d=4;if(c>b>a)printf("%d\n",d);elseif((c-b)==a)printf("%d\n",2*d);else printf("%d\n",4*d);}