為啥這樣不行?
#include <stdio.h>
int main()?
{
? ? int sale=120; //銷售業(yè)績?yōu)?20萬
? ? int year=1; //剛剛進入公司1年
? ? //完善代碼
? ? if(year>=2&&sale>100)
? ? {
? ? ? ? printf("%s\n","中");
? ? }
? ? else
? ? {
? ? ? ? printf("%s\n","很遺憾,期望你再接再厲");
? ? }
? ? return 0;
}
2020-10-09
你并沒有定義倆個中文字符串,不能直接用字符串格式輸出。要么你先定義兩個字符串;要么你去掉格式輸出,直接把中文打在輸出雙引號里面,暴力輸出。而且剛剛我復制運行時候發(fā)現(xiàn)你有倆個分號打了中文字符;
#include <stdio.h>
int main()
{
? ? int sale=120; //銷售業(yè)績?yōu)?20萬
? ? int year=1; //剛剛進入公司1年
? ? //完善代碼
? ? if(year>=2&&sale>100)
? ? {
? ? ? ? printf("中");
? ? }
? ? else
? ? {
? ? ? ? printf("很遺憾,期望你再接再厲");
? ? }
? ? return 0;
}