原始问题:
请问C语言判定考试成绩
的程序是怎么写的以下是一个简单的C语言判定考试成绩的程序#include <stdio.h>
int main()
{
int score;
printf("Please enter the score: ");
scanf("%d", &score); // 输入考试成绩
if (score >= 90) { // 判断成绩并输出相应信息
printf("Excellent! ");
} else if (score >= 80) {
printf("Good job! ");
} else if (score >= 70) {
printf("Not bad. "); } else if (score >= 60) { printf("Try harder next time.
"); } else { printf("You failed the exam.
"); }
return 0; // 程序正常退出时返回0值。 }
Prev:中国式现代化与时代新人的使命担当研究性学习报告