24 lines
486 B
C
24 lines
486 B
C
|
#include "b.h"
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int N; // 定义数组长度
|
||
|
printf("Please input the length of the array: ");
|
||
|
scanf("%d", &N);
|
||
|
int arrInput[N]; // 未初始化的数组
|
||
|
printf("Please input %d numbers: ", N);
|
||
|
int i = 0;
|
||
|
while (i < N)
|
||
|
{
|
||
|
scanf("%d", &arrInput[i++]);
|
||
|
}
|
||
|
|
||
|
int *arrOutput = arrSort(arrInput, N);
|
||
|
for (int i = 0; i < N; i++)
|
||
|
{
|
||
|
printf("%d ", arrOutput[i]);
|
||
|
}
|
||
|
printf("\n");
|
||
|
return 0;
|
||
|
}
|