以下程序的运行结果是 。#includeint main(){int x,y,z;x=3;y=3;z=x==y;printf("z=%d\n",z);return 0;}
查看答案
以下程序的运行结果是 。#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;}