OJ-Problems-Source/QUSTOJ/1746.c
2016-05-26 07:36:44 +08:00

24 lines
348 B
C

#include <stdio.h>
#include <stdlib.h>
int a[11]={1,4,6,9,13,16,19,28,40,100,0};
int cmp(const void* a,const void* b)
{
return *(int*)a-*(int*)b;
}
int main()
{
int m;
scanf("%d",&m);
a[10]=m;
qsort(a,11,sizeof(int),cmp);
for(int i=0;i<11;i++)
{
printf("%d ",a[i]);
}
printf("\n");
return 0;
}