From f07f22074a6ec5caab4dbb2c5b2e07613f431fcc Mon Sep 17 00:00:00 2001 From: pifwgepx8 <947549275@qq.com> Date: Mon, 13 Nov 2023 16:35:29 +0800 Subject: [PATCH] =?UTF-8?q?Delete=20'=E9=A2=98=E7=9B=AE=E4=BA=94.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 题目五.c | 60 ----------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 题目五.c diff --git a/题目五.c b/题目五.c deleted file mode 100644 index ca17e34..0000000 --- a/题目五.c +++ /dev/null @@ -1,60 +0,0 @@ -#include -int main(){ - float a[4]={99.5,77.9,92.5,0},b[4]={88.5,56.5,99.0,0},c[4]={89.5,87.5,60.5,0}; - int s[4]={10001,10002,10003,0},class[4]={11,12,11,0}; - scanf("%d%d%f%f%f",&s[3],&class[3],&a[3],&b[3],&c[3]); - int m; - m=s[3]; - int i,j; - float t; - for(i=0;i<3;i++) - { - for(j=i+1;j<3;j++) - { - if(class[i]>class[j]) - { - t=s[j]; - s[j]=s[i]; - s[i]=t; - t=class[j]; - class[j]=class[i]; - class[i]=t; - t=a[j]; - a[j]=a[i]; - a[i]=t; - t=b[j]; - b[j]=b[i]; - b[i]=t; - t=c[j]; - c[j]=c[i]; - c[i]=t; - } - if(class[i]=class[j]&&(a[i]+b[i]+c[i])<(a[j]+b[j]+c[j])) - { - t=s[j]; - s[j]=s[i]; - s[i]=t; - t=class[j]; - class[j]=class[i]; - class[i]=t; - t=a[j]; - a[j]=a[i]; - a[i]=t; - t=b[j]; - b[j]=b[i]; - b[i]=t; - t=c[j]; - c[j]=c[i]; - c[i]=t; - } - } - } - for(i=0;i<4;i++) - { - printf("%d %d %.1f %.1f %.1f\n",s[i],class[i],a[i],b[i],c[i]); - if(s[i]==m) - printf("inserted\n"); - } - - return 0; -} \ No newline at end of file