View Code of Problem 49

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int a[20];
int main(){
	int x;
	scanf("%d",&x);
	for(int i =0;i<x;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+x);
	for(int i=0;i<x;i++){
		printf("%d",a[i]);
		if(i!=x-1){
			printf(" ");
		}
		else{
			printf("\n");
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 49