请阅读以下程序,若运行时输入:1605时,程序的运行结果是。main(){intt,h,m;scanf("%d",&t);h=t/100%12;if(h==0)h=12;printf("%d:",h);m=t%100;if(m<10)printf("0");printf("%d",m);if(t<1200||t==2400)printf("AM");elseprintf("PM");}
查看答案
以下程序实现:输入园的半径r和运算标志m,按照运算标志进行指定计算,请填空。标志运算a面积c周长b二者均计算#definepi=3.14159main(){charm;floatr,c,a;printf("Inputmark a c or b && r\n");scanf("%c%f",&m,&r);if( {a=pi*r*r;printf("area is %f",a);}if( {c=2*pi*r;printf("circle is %f",c);}if( {a=pi*r*r;c=2*pi*r;printf("area&& circle are %f %f",a,c);}}
若运行时输入:5999,则以下程序的运行结果是。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);}
以下程序实现输出x,y,z三个数中的最大者。请分析程序填空。main(){intx=4,y=6,z=7;;int;if()u=x;elseu=y;if(else v=z;printf("v=%d",v);}
以下程序将输入的三个整数按从大到小顺序输出,请分析程序填空。main(){intx,y,z,c;scanf("%d%d%d",&x,&y,&z);if(){c=y;y=z;z=c;}if(){c=x;x=z;z=c;}if(){c=x;x=y;y=c;}printf("%d,%d,%d",x,y,z);}