#include<bits/stdc++.h>
using namespace std;
int main()
{ int n,c1,c2,mx; ##c---kovo stepend
cin>>n;## n---- kolvo studentov
string a1,a2,mxa; ## a----famil imya otch
cin>>c1>>a1;
mx=c1;
for (int i=2;i<=n;i++)
{cin>>c2>>a2;
if (mx<c2)
{mx=c2;
mxa=a2;
}}
cout<<mx<<"--max stepend --- "<<a<<"☺";
☺♠☺☺☻
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include<bits/stdc++.h>
using namespace std;
int main()
{ int n,c1,c2,mx; ##c---kovo stepend
cin>>n;## n---- kolvo studentov
string a1,a2,mxa; ## a----famil imya otch
cin>>c1>>a1;
mx=c1;
for (int i=2;i<=n;i++)
{cin>>c2>>a2;
if (mx<c2)
{mx=c2;
mxa=a2;
}}
cout<<mx<<"--max stepend --- "<<a<<"☺";
☺♠☺☺☻