不知道問(wèn)題出在哪里,望大佬解答
#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("你獲得了優(yōu)秀員工獎(jiǎng)");
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? printf("很遺憾,期望你再接再厲");
? ? ? ? }
? ? }
? ? else
? ? {
? ? ? ? printf("很遺憾,期望你再接再厲");
? ? }
? ? return 0;
}
? ??
2019-02-06
可以看看是不是打完字沒(méi)切回英文半角
2019-02-07
錯(cuò)誤能不能把錯(cuò)誤信息貼出來(lái)
2019-02-06
我的和你差不多,但我的是正確的
2019-02-05
#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","獲獎(jiǎng)");
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? printf("%s\n","很遺憾,期望你再接再厲");
? ? ? ? }
? ? ? ??
? ? ? ??
? ? ? ??
? ? }
? ? else
? ? {
? ? ? ? printf("%s\n","很遺憾,期望你再接再厲");
? ? }
字符串應(yīng)該用%s表示