题目内容

阅读程序写结果:#include int main(){float x=3, y=5;char op=‘/’;double r;switch(op){ case '+': r = x + y; break;case '-': r = x - y; break;case '*': r = x * y; break;case '/': r = x / y; break;}printf("%.1f", r);return 0;}输出:____________

查看答案
更多问题

阅读程序写结果:#include int main(){ char ch1='a',ch2='B',ch3='E';if(ch1>ch2)if(ch2>ch3) ch3++;else--ch3;printf("ch3=%c\n",ch3);return 0;}输出:________(注意区分大小写)

阅读程序写结果:#include int main(){float x=15.3,y;switch((int)x/10){case 0: y=1.0;printf("y=%f\n",y);break;case 1: y=2*x+1;printf("y=%f\n",y);break;case 2: y=3*x*x+2;printf("y=%f\n",y);break;default:printf("No definition.\n");}return 0;}输出:_____________(注意答案区分大小写)

设有程序段: t=6;a=7;b=8; if(a=b) t=a;这段程序执行后,t的结果是( )。

阅读程序写结果:#include void main(){ int i=0,a=2;if(i==0) printf(“**”);else printf(“$$”);printf(“*”);}输出:___________

答案查题题库