這里那里不對(duì)求指點(diǎn)
#include <stdio.h>
int main()
{
? ? /*
? ? 當(dāng)成績(jī)小于60時(shí) 則學(xué)習(xí)成績(jī)?yōu)椴?/p>
? ? 當(dāng)成績(jī)大于等于60且小于80時(shí) 則成績(jī)?yōu)檎?/p>
? ? 當(dāng)成績(jī)大于等于80且小于95時(shí) 則的成績(jī)?yōu)閮?yōu)秀
? ? 當(dāng)成績(jī)大于等于95且小于等于100時(shí) 的成績(jī)?yōu)閮?yōu)異
? ? */
? ? int a = 40;
? ? int b = 60;
? ? printf("成績(jī)是否正常: %d\n" , a>=60 && b<80);
? ?
}
2021-04-03
printf("成績(jī)是否正常");
printf("%c\n",a>=60&&a<=80?'y':'n');
2021-08-06
你的printf()中的括號(hào)用了中文輸入法的括號(hào),不信你復(fù)制到編譯器再改一下括號(hào)就可以運(yùn)行了
2021-04-07
成績(jī)是a還是b?定義一個(gè)變量表示就行了。另外程序有bug,假如成績(jī)?yōu)?,按照你寫(xiě)的輸出不正常?
????int score;
? ? score = 76;
? ? printf("成績(jī)是否正常: %d\n", score >= 60 && score < 80);