目录:
题目:
期末考试要考语文、英语、数学3科,如果3门总分在270分以上,就可以得到一朵小红花。输入蜗蜗的语文、英语、数学成绩,请问蜗蜗能不能得到小红花?
代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int chinese,englesh,math;
cin>>chinese>>englesh>>math;
if(chinese+englesh+math>270){
cout<<"Yes";
}
else{
cout<<"No";
}
return 0;
}
知识点:
if(判断条件) | |
cin>>变量名;
判断符的运用(>,<,>=,<=) |