Problem E: 成绩

Problem E: 成绩

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

A、小B参与了一场数学考试。

现在已知他们两个人的分数分别为a,b

请问有几个人没有合格(成绩小于60为不合格)。

例如

输入50 59,输出2

输入61 59,输出1

输入61 62,输出0

提示:使用if语句。

#include <iostream>
using namespace std;
int main() {
    int a, b;
    cin >> a >> b;
    int ans = 0; //记录不合格的人数
    if (     ) 
         ans = ans + 1; // 如果 a 不合格,ans 加上 1。
    if (     )  
        ans = ans + 1; // 如果 b 不合格,ans 加上 1。
    cout << ans;
    return 0;
}


Sample Input Copy

50 59

Sample Output Copy

2