#include<bits/stdc++.h> using namespace std; int main(){ int a,b[5]; cin>>a; for(int i = 0;i<a;i++)cin>>b[i]; sort(b,b+a); for(int i = 0;i < a;i++){ cout<<b[i]; if(i!=a-1)cout<<" "; } return 0; }
Double click to view unformatted code.