Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main () {
- int n,i=1,x,maxi=1,nr=1;
- cout<<"nr note=";cin>>n;
- while (i<=n)
- {
- cout<<"nota"<<i<<'=';
- cin>>x;
- if (x>maxi)
- {
- maxi=x;
- nr=1;
- }
- else if (x==maxi)
- nr++;
- i++;
- }
- if (nr==1)
- cout<<nr<<" elev a luat "<<maxi<<endl;
- else
- cout<<nr<<" elevi au luat "<<maxi<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement