這哪里錯(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\n,獲得優(yōu)秀員工獎(jiǎng)");} ??????else ??????{printf("%s\n",?"很遺憾,期望你再接再厲");} ????} ????else ????{ ????????printf("%s\n,期望你再接再厲?"); ????} ????? ????return?0; }
? ? ?
??
2015-04-07
逗號(hào)不匹配引起的。
2015-01-23
#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\n","獲得優(yōu)秀員工獎(jiǎng)"); ??
? ? ? ?}
? ? ? ? else
? ? ? ? {
? ? ? ? ?printf("%s\n","很遺憾,期望你再接再厲"); ??
? ? ? ? }
? ? ? ? ?
? ? ?}
? ? else
? ? ?{
? ? ? ? ?printf("%s\n","很遺憾,期望你再接再厲"); ??
? ? ? ? }
? ? ? ??
? ? return 0;
}
2015-01-19
printf("%s\n","獲得優(yōu)秀員工獎(jiǎng)");最后一個(gè)同理~
2015-01-19