백준 algorithm

백준 10039 - 평균 점수

cosmohoo 2020. 3. 16. 00:16
반응형

문제 설명

 

 

 

#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    
    int sum=0;
    int tmp;
    for(int i=0; i< 5; i++)
    {
        cin>>tmp;
        if(tmp<40)tmp=40;
        sum+=tmp;
    }
    
    cout<< sum/5 <<'\n';
    return 0;
}

반응형