在一行中输入三个整数
,分别表示牛牛的数学、语文和英语成绩,用空格隔开。
如果牛牛会被请家长,输出
;否则输出
。
80 60 50
NO
平均分为,牛牛及格,不会被请家长,输出 NO。
70 55 40
YES
平均分为,牛牛未通过考核,会被请家长,输出 YES。
本题已于下方时间节点更新,请注意题解时效性:
1. 2025-06-03 优化题面文本与格式。
#include <stdio.h>
int main()
{
int math =0,chinese = 0, english = 0;
scanf("%d %d %d", &math, &chinese, &english);
float average = (math+chinese+english)/3.0;
if(average >= 60)
printf("NO\n");
else
printf("YES\n");
return 0;
} #include <stdio.h>
int main() {
int math, chinese, eng;
while (scanf("%d %d %d", &math, &chinese, &eng) != EOF) {
getchar();
(math + chinese + eng) / 3 < 60?
printf("YES\n"):
printf("NO\n");
}
return 0;
}
#include <stdio.h>
int main() {
int a,b,c;
while((scanf("%d %d %d",&a,&b,&c))!=EOF){
if((a+b+c)/3>=60)
printf("NO\n");
else
printf("YES\n");
}
}