RYIP在线题库
首 页   >   习题练习   >   提交
Problem1318--函数练习-3

1318: 函数练习-3

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

【 Description 】

编写一个函数sortInc(int *array,  int  len),其功能是对一个包含len个元素的整型数组进行从小到大的排序。
函数原型如下:
void  sortInc(int  *array,  int  len);
其中array为指向待排序数组的指针,len为数组中的元素个数。

【 Input 】

从键盘上输入一个整数n(0<n<=100),接着输入n个整数并放入数组中,再调用上述函数对其按从小到大排序,最后将排好序的数组输出。

【 Output 】

输出的数据之间用空格分隔。

【 Sample Input 】

6 
77 68 92 33 26 50

【 Sample Output 】

26 33 50 68 77 92

【 Source/Category 】