求出最大值

#include<bits/stdc++.h>//fixed<<setprecision(2)
using namespace std;
int main()
{
    
    
	int a,b,c=0;
	cin>>a;
	for(int i=1;i<=a;i++)
	{
    
    cin>>b;
	if(b>c)
	c=b;}
	cout<<c;
    return 0;
}

猜你喜欢

转载自blog.csdn.net/m0_52628784/article/details/110158317