就是60-70等于及格,71-80良好~~求列子谢谢~~~
if(score <60) Console.WriteLine("不及格"); else if(score>=60 && score<=70) Console.WriteLine("及格"); else if(score>=71 && score<=80) Console.WriteLine("良好"); else Console.WriteLine("优秀");
public string GetFlag(int score) { if (score < 60) return "不及格"; else if (score >= 60 && score <= 70) return "及格"; else if (score >= 71 && score <= 80) return "良好"; else return "优秀"; }