Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int comp(int a,int b)
- {
- return a>b;
- }
- int main()
- {
- int n;
- cin>>n;
- int nr,v[n+1],lv=0;
- bool ok=false;
- for(int i=1;i<=n;++i)
- {
- cin>>nr;
- if(nr%10==0)
- v[lv++]=nr,ok=true;
- }
- if(ok)
- {
- sort(v,v+lv,comp);
- for(int i=0;i<lv;++i)
- cout<<v[i]<<' ';
- }
- else
- cout<<"NU EXISTA";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement