Skip to content

Instantly share code, notes, and snippets.

@MohamedTaha98
Created July 24, 2017 11:17
Show Gist options
  • Save MohamedTaha98/5370541caa6cd08f48c9b27b0eaa44bc to your computer and use it in GitHub Desktop.
Save MohamedTaha98/5370541caa6cd08f48c9b27b0eaa44bc to your computer and use it in GitHub Desktop.
#include <iostream>
#include <algorithm>
using namespace std;
int main () {
int n;
cin >> n;
int ar[n];
for (int i = 0; i < n; i++)
cin >> ar[i];
sort (ar, ar + n);
for (int i = 0; i < n; i++)
cout << ar[i] << " ";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment