Information
- ID
- 6743
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 6
- Tags
- (None)
- # Submissions
- 289
- Accepted
- 96
- Uploaded By
#include <stdio.h>
int main() {
int score_chinese, score_math;
// 输入语文和数学成绩
scanf("%d", &score_chinese);
scanf("%d", &score_math);
// 判断是否有一门课不及格
if ((score_chinese < 60 && score_math >= 60) || (score_chinese >= 60 && score_math < 60)) {
printf("1\n"); // 有一门课不及格
} else {
printf("0\n"); // 没有一门课不及格
}
return 0;
}
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.