C++ 判断学生是否恰好有一门课不及格
#include
int main() { int chinese, math; cin >> chinese >> math;
if (chinese < 60 && math >= 60) {
cout << 1 << endl;
} else if (chinese >= 60 && math < 60) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/n1QV 著作权归作者所有。请勿转载和采集!