#include <stdio.h>
int main()
{ int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if(sale>100)
{
if (year>=2)
printf("%s/n","恭喜获得优秀员工奖");
}
else
{
printf("%s/n","很遗憾,期望你再接再厉");
}
return 0;
}
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
JAVA
括号不对是不是
除了"/n"的错误,还少了一个else吧!
在销售业绩大于100时,有两种情况:一、入职年数大于等于2;二、入职年数小于2的情况。
只说明了第一种情况,而没有说明第二种情况,就会显示运行成功,但输出错误。
每个if都要配个printf应该是
if(sale>100)
{
if (year>=2)
{ printf("%s\n","恭喜获得优秀员工奖");
}
{ printf("%s\n","很遗憾,期望你再接再厉“)
}
else
{
printf("%s\n","很遗憾,期望你再接再厉");
}
你这两行的换行符号打错了,应该是\n才对。 printf("%s/n","恭喜获得优秀员工奖"); printf("%s/n","很遗憾,期望你再接再厉");