Josif_tepe

Untitled

Mar 16th, 2026
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.     int n;
  8.     cin >> n;
  9.    
  10.     int niza[n];
  11.     for(int i = 0; i < n; i++) {
  12.         cin >> niza[i];
  13.     }
  14.    
  15.     sort(niza, niza + n);
  16.    
  17.     for(int i = 0; i < n; i++) {
  18.         cout << niza[i] << " ";
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment