Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, z[11], address=-1000001, d=0;
- cin>>n;
- for(int i=0;i<n;i++)
- {
- cin>>z[i];
- if(z[i]<0)
- {
- if(z[i]>address)
- {
- address=z[i];
- d=i+1;
- }
- }
- }
- if(d==0)
- {cout<<"NERA"<<endl;}else{cout<<d<<endl;}
- return 0;
- }
Add Comment
Please, Sign In to add comment