大家?guī)臀铱匆幌?,哪里錯(cuò)了,為什么是運(yùn)行錯(cuò)誤??
#include <stdio.h>
int main()?
{
? ? int sale=120; //銷售業(yè)績(jī)?yōu)?20萬(wàn)
? ? int year=1; //剛剛進(jìn)入公司1年
? ? //完善代碼
? ? if(sale>100)
? ? {
? ? ? ? if(year>=2)
? ? ? ? {
? ? ? ? ? ? printf("%s","恭喜你獲得優(yōu)秀員工獎(jiǎng)!");
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? printf("%s","很遺憾,期望你再接再厲");
? ? ? ? }
? ? }
? ? else
? ? {
? ? ? ? printf("%s","很遺憾,期望你再接再厲");
? ? }
? ? return 0;
}
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ??
? ? return 0;
}
2019-11-18
我看過(guò)了你的分號(hào)全都是中文下打的,所以運(yùn)行錯(cuò)誤? 以后注意一下? ?希望能采納~~
2019-11-17
分號(hào)用錯(cuò)了 應(yīng)該是英文的
你用的是中文的分號(hào)
2019-11-15
#include <stdio.h>
int main()
{
??? int sale=120; //銷售業(yè)績(jī)?yōu)?20萬(wàn)
??? int year=1; //剛剛進(jìn)入公司1年
??? //完善代碼
??? if(sale>100)
??? {
??????? if(year>=2)
??????? {
??????????? printf("恭喜你獲得優(yōu)秀員工獎(jiǎng)!");
??????? }
??????? else
??????? {
??????????? printf("很遺憾,期望你再接再厲");
??????? }
??? }
??? return 0;
}