mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1746.c
This commit is contained in:
parent
20cb4f38a6
commit
65aa82d8cd
23
QUSTOJ/1746.c
Normal file
23
QUSTOJ/1746.c
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user