From 641ffa62f21972dceac2022f71ea44de3db84fae Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Tue, 28 Jun 2016 14:28:09 +0800 Subject: [PATCH] Create 1772.c --- QUSTOJ/1772.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 QUSTOJ/1772.c diff --git a/QUSTOJ/1772.c b/QUSTOJ/1772.c new file mode 100644 index 0000000..9915080 --- /dev/null +++ b/QUSTOJ/1772.c @@ -0,0 +1,14 @@ +#include +#include +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; +}