3073 最高分数

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int x,maxx = 0; //公理:求最大值时,要初始化最小
    for(int i = 1; i <= 5; i++) //循环5次
    {
        cin >> x;
        if(x > maxx) //如果x比最大值maxx大
            maxx = x; //更新最大值maxx 
    } 
    cout << maxx;
    return 0;
}

 

posted @ 2024-07-03 16:42  CRt0729  阅读(31)  评论(0)    收藏  举报