Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i,k=0,n,m=999,p=0;
- cin>>n;
- int v[100];
- for(i=0;i<n;i++)cin>>v[i];
- while(k<2)
- {
- for(i=0;i<n;i++)
- if(v[i]==m){p=p+1;}
- if(p==0){cout<<m<<" ";k=k+1;}
- p=0;
- m=m-1;
- }
- }
- Citește mai multe pe Brainly.ro - https://brainly.ro/tema/1117096#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement