最新回答 / bb1234
#include <stdio.h>#define N 10int main(){ int score[N]={67,98,75,63,82,79,81,91,66,84}; int i,j; int Max=0,Min=score[0],temp; float Mid=0,Sum=0; for(i=0;i<N;i++)Sum+=score[i]; //总成绩 Mid=Sum/N;//平均分 for(i=0;i<N;i++) { ...
2022-01-19
return 15.6+(m-3)*2.3;
}
}
int main()
{
int num;
num=Time(9,12);
printf("小明每天打车的总费用为%d元",num+num);
return 0;
}
}
}
int main()
{
int num;
num=Time(9,12);
printf("小明每天打车的总费用为%d元",num+num);
return 0;
}
#include <stdio.h>
int Time(int n,int m)
{
if(0<n<5||23<n<24&&m<=3)
{
return 15.6;
}
else if(5<=n<=23&&m<=3)
{
return 13;
}
else if(0<n<5||23<n<24&&m>3)
{
return 15.6+(m-3)*1.2*2.3;
}
else if(5<=n<=23&&m>3)
{
int Time(int n,int m)
{
if(0<n<5||23<n<24&&m<=3)
{
return 15.6;
}
else if(5<=n<=23&&m<=3)
{
return 13;
}
else if(0<n<5||23<n<24&&m>3)
{
return 15.6+(m-3)*1.2*2.3;
}
else if(5<=n<=23&&m>3)
{
最新回答 / 慕容2518002
找到问题了,你的大括号位置不对,倒数第三个 } 应该放在最后一个else前,应该这样 if(sale>100) { if(year>=2) { printf("有资格获得优秀员工奖"); } else { printf(" 很遗憾,期望你再接再厉 "); } }else{ printf("很遗憾,期望你再接再厉"); }
2022-01-17
#include <stdio.h>
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","获得优秀员工奖");
}
else
{
printf("%s\n"," 很遗憾,期望你再接再厉");
}
return 0;
}
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>=100&&year>=2)
{
printf("%s\n","获得优秀员工奖");
}
else
{
printf("%s\n"," 很遗憾,期望你再接再厉");
}
return 0;
}
2022-01-17
最新回答 / 慕少9104305
https://www.oschina.net/search?i ... 1%32%2E%38%67%74%70https://www.oschina.net/search?i ... 1%32%2E%38%62%70%6Chttps://www.oschina.net/search?i ... 0%B1%32%2E%38%6E%74https://www.oschina.net/search?i ... 0%B1%32%2E%38%64%77https://www.oschina.net/search?...
2022-01-16
最新回答 / 慕少9104305
https://list.jd.com/search?keywo ... 1%32%2E%38%68%6B%70https://list.jd.com/search?keywo ... 1%32%2E%38%6E%64%6Fhttps://list.jd.com/search?keywo ... 0%B1%32%2E%38%79%76https://list.jd.com/search?keywo ... 0%B1%32%2E%38%72%77https://list.jd.com/search?keyw...
2022-01-15