以下程序的运行结果是 。#includeint main(){ int x,y,z;x=1;y=2;z=3;x=y--<=x||x+y!=z;printf("%d,%d",x,y);return 0;}
查看答案
以下程序的运行结果是 。#includeint main(){ int a1,a2,b1,b2;int i=5,j=7,k=0;a1=!k;a2=i!=j;printf("a1=%d\ta2=%d\n",a1,a2);b1=k&&j;b2=k||j;printf("b1=%d\tb2=%d\n",b1,b2);return 0;}
若运行时输入:2<回车>,则以下程序的运行结果是 。#include int main( ){ char class;printf("Enter 1 for 1st class post or 2 for 2nd post");scanf("%c",&class);if (class=='1')printf("1st class postage is 19p");elseprintf("2nd class postage is 14p");return 0;}
若运行时输入:4.4<回车>,则以下程序的运行结果是 。#include int main( ){ float costprice,sellingprice;printf("Enter Cost Price $:");scanf("%f",&costprice);if(costprice>=5){ sellingprice=costprice+costprice*0.25;printf("Selling Price(0.25)$%6.2f",sellingprice);}else{ sellingprice=costprice+costprice*0.30;printf("Selling Price(0.30)$%6.2f",sellingprice);}return 0;}
请阅读以下程序,若运行时输入:1605<回车>时,程序的运行结果是 。#include int main(){ int t,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");return 0;}