题目内容

若运行时输入:5999,则以下程序的运行结果是 。#include int main(){ int x;float y;scanf("%d",&x);if(x>=0&&xx<=2999) y=18+0.12*x;if(x>=3000&&x<=5999) y=36+0.6*x;if(x>=6000&&x<=10000)y=54+0.3*x;printf("%6.1f",y);return 0;}

查看答案
更多问题

以下程序的运行结果是 。#includeint main(){ int a,b,c,d,x;a=c=0;b=1;d=20;if(a) d=d-10;else if(!b)if(!c) x=15;else x=25;printf("%d\n",d);return 0;}

以下程序的运行结果是 。#includeint main(){ int x,y=-2,z=0;if((z=y)<0) x=4;else if(y==0) x=5;else x=6;printf("\t%d\t%d\n",x,z);if(z=(y==0))x=5;x=4;printf("\t%d\t%d\n",x,z);if(x=z=y) x=4;printf("\t%d\t%d\n",x,z);return 0;}

以下程序的运行结果是 。#include int main(){ int a=-10,b=-3;printf("%d,",-a%b);printf("%d,",(a-b,a+b));printf("%d\n",a-b?a-b:a+b);return 0;}

以下程序的运行结果是 。#include int main(){ int x,y,z;x=3;y=z=4;printf("%d,",(x>=y>=x)?1:0);printf("%d\n",z>=y&&y>=x);}

答案查题题库