这样不行吗,按理说应该不用在if里面写else的,可以在下面直接写else才对啊,可是为什么输出没文字呢?
#include <stdio.h>
int main()
{
int sale=120; //销售业绩为120万
int year=1; //刚刚进入公司1年
//完善代码
if (sale>100)
{
if(year>=2)
{
printf("恭喜小明获得优秀员工奖");
}
}
else
{
printf("很遗憾,期望你再接再厉");
}
return 0;
}
2016-05-01
举报