cpp 不要注释:题目描述小可所在的学校要评选优秀学生小可已经知道获得优秀学生条件:考试分数在500分以上并且入学时间不小于一年。请你编写个程序帮小可判断下能否获得优秀学生。输入描述两个整数第一个表示考试总分第二个表示入学年数。输出描述如果有资格变成优秀学生输出恭喜获得优秀学生否则输出再接再厉。样例输入200 5输出恭喜获得优秀学生
#include
int main() { int score, years; cin >> score >> years;
if (score >= 500 && years >= 1) {
cout << "恭喜获得优秀学生" << endl;
} else {
cout << "再接再厉" << endl;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/h6oo 著作权归作者所有。请勿转载和采集!