crsandu

Untitled

Jan 3rd, 2016
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. Problema: http://www.pbinfo.ro/?pagina=probleme&id=509&force_reload&cpp
  2.  
  3. #include <iostream>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. int nr, n, v[10000];
  9.  
  10. int main()
  11. {
  12.   cin >> n;
  13.   for (int i=0; i<n; i++)
  14.   {
  15.     cin >> v[i];
  16.   }
  17.   sort(v, v+n);
  18.   for (int i=0; i<n; i++)
  19.   {
  20.     cout << v[i] << " ";
  21.   }
  22.              
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment