為什莫啊///?
#include <stdio.h>
int main()
{
??? int sale=120; //銷(xiāo)售業(yè)績(jī)?yōu)?20萬(wàn)
??? int year=1; //剛剛進(jìn)入公司1年
??? //完善代碼
???
??? if(sale>100)
??? if(year>=2)
???
????? {? printf("%s\n","吃大餐");
???
????? }
???
???????? printf("%s\n","買(mǎi)玩具");
????? }?
???
??? else
??? {
??????? printf("%s\n","沒(méi)有獎(jiǎng)勵(lì)");
??? }
???
???
???
???
???
???
???
??? return 0;
}
2018-10-29
? ? ?if(sale>100)
? ? ? {
? ? ? ? ? ? if(year>=2)
? ? ? ? ? ?{?
? ? ? ? ? ? ? printf("吃大餐");
? ? ? ? ? ?}
? ? ? ? ? ? ? ?printf("很遺憾,期望你再接再厲");
? ? ? ? ? ?}
? ? else
? ? ? ?{
? ? ? ? printf("%s\n","沒(méi)有獎(jiǎng)勵(lì)");
? ? ? ?}
2018-10-24
這個(gè)題目的最大前提是入職兩年,所以要先if(year>=2)在if(sale>100)
2018-10-24
??? if(sale>100)
?? {
? ? if(year>=2)
???
????? {? printf("%s\n","吃大餐");
???
????? }
???
???????? printf("%s\n","買(mǎi)玩具");
? ? ? ??
???
??? else
? ? ?? {
??????? printf("%s\n","沒(méi)有獎(jiǎng)勵(lì)");
}
??? }