#include <stdio.h>
int main()
{
float math,physics,chemistry; // 定义变量存放数学、物理、化学的成绩
printf("请输入数学、物理、化学的成绩:");
scanf("%f%f%f",&math,&physics,&chemistry);
float total = math + physics + chemistry; // 总成绩
if((math >= 60) || (physics >= 50) || (chemistry >= 40) || (total >= 200) || (math + physics >= 150))
printf("合格\n");
else
printf("不合格\n");
return 0;
}
温馨提示:答案为网友推荐,仅供参考