#P1119. 一维数组排序(数组)

一维数组排序(数组)

Problem Description

对一维数组按照从小到大的顺序排序。程序定义函数sort()来实现数组a的排序。函数原型如下:

void  sort(int a[], int n);

数组元素的输出调用PrintArr()。

Input Format

第一行输入一个整数n(1<=n<=10),表示数组有n个整数;第二行输入n个整数。

Output Format

输出占一行。对这n个整数数按照从小到大的顺序输出,数据之间用一个空格隔开。
6
6 5 1 2 3 4
1 2 3 4 5 6