运行下面程序,输入整数10 25 15,输出结果是( )。#include int main(){int a,b,c;scanf("%d%d%d", &a, &b, &c);if (a
查看答案
运行下面程序,输入数值5,输出( );输入10,输出( )。#include int main(){ float x,y;scanf("%f", &x);if(x<5) y=x;if(x>=5 && x<10)y=2*x-2;if(x>=10) y=x/5;printf("%5.1f\n",y);return 0;}
运行下面程序,输入2,输出( );输入10,输出( )。#include int main(){double x,y;scanf("%lf", &x);if(x<=2) y=x/5;else if(x<10) y=5*x;else y=x/5;printf("%5.1f\n",y);return 0;}
运行下面程序,输入72,输出结果为( )。#include int main(){char score;scanf("%d", &score);switch(score/10){ case 10:case 9: printf("A\n");break;case 8: printf("B\n"); break;case 7: printf("C");case 6: printf("D\n"); break;default: printf("E\n");break;}return 0;}
运行下面程序,输出结果为( )。#include int main( ){int a=8;switch(a%3){case 0: printf("%d\n", a++);case 1: printf("%d\n", ++a);case 2: printf("%d ", a--);case 3: printf("%d\n", --a); break;default: printf("%d\n", a);}return 0;}