题目内容

以下程序实现:输入三个整数,按从大到小的顺序进行输出。请在________________内填入正确内容。#include void main( ){int x,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);}

查看答案
更多问题

请读程序:#includevoid main(){int x=1,y=0,a=0,b=0;switch(x){case 1:switch(y){case 0: a++;break;case 1: b++;break;}case 2:a++;b++;break;}printf(″a=%d,b=%d″,a,b);}上面程序的运行结果是____________。

假设奖金税率如下(a代表奖金,r代表税率)a<500r=0%500<=a<1000r=5%1000<=a<2000r=8%2000<=a<3000r=10%3000<=ar=15%以下程序对输入的一个资金数,求税率和应交税款以及实际奖金数(扣除奖金税后)。题中r代表税率,t代表税款,b代表实得奖金数。请在_____________内填入正确内容。#include void main(){float a,r,t,b;int c;scanf(″%f″,&a);if(a>=3000) c=6;else c=_________;switch(c){case 0:r=0;break;case 1:r=0.05;break;case 2:case 3:_________;break;case 4:case 5:r=0.1;break;case 6:r=0.15;break;}t=a*r;b=a-t;printf(″r=%f,t=%f,b=%f″,r,t,b);}

以下程序计算某年某月有几天。其中判别闰年的条件是:能被4整除但不能被100整除的年是闰年,能被400整除的年也是闰年。请在_____________内填入正确内容。#include ″stdio.h″void main(){int yy,mm,len;printf(″year,month=″);scanf(″%d %d″,&yy,&mm);switch(mm){case 1: case 3: case 5: case 7:case 8: case 10: case 12:_____________;break;case 4: case 6 case 9: case 11: len=30;break;case 2:if(_____________)len=29;else_____________;break;default:printf(″input error″);break;}printf(″the length of %d %d is %d\n″,yy,mm,len);}

以下程序的运行结果是__________ 。#include ″stdio.h″void main( ){int x=1,y=1,z=1;y=y+z;x=x+y;printf("%d,",x

答案查题题库