Create 1772.c

pull/22/head
Kirigaya Kazuto 2016-06-28 14:28:09 +08:00 committed by GitHub
parent 0496e70793
commit 641ffa62f2
1 changed files with 14 additions and 0 deletions

14
QUSTOJ/1772.c Normal file
View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
int a[8];
int cmp(const void* a,const void* b)
{
return *(int*)b-*(int*)a;
}
int main()
{
for(int i=0;i<3;i++) scanf("%d",&a[i]);
qsort(a,3,sizeof(int),cmp);
for(int i=0;i<2;i++) printf("%d ",a[i]);
return printf("%d\n",a[2]),0;
}