請問我這樣寫行嗎
#include <stdio.h>
int main()
{
??? int sale=120; //銷售業績為120萬
??? int year=1; //剛剛進入公司1年
??? //完善代碼
??? if(sale>=100&&year>=2)
??? printf("%s\n","優秀員工");
??? else
??? printf("%s\n","很遺憾,希望你再接再厲");
???
???
???
???
???
???
???
???
???
???
???
??? return 0;
}
int main()
{
??? int sale=120; //銷售業績為120萬
??? int year=1; //剛剛進入公司1年
??? //完善代碼
??? if(sale>=100&&year>=2)
??? printf("%s\n","優秀員工");
??? else
??? printf("%s\n","很遺憾,希望你再接再厲");
???
???
???
???
???
???
???
???
???
???
???
??? return 0;
}
2015-02-27
雖然程序的實現有多種寫法,可是這個任務的考察點是,嵌套分支語句
2015-02-26
運行一下不就知道了嗎