From 6d0762b33a7654a19674381c5846914afb1eda48 Mon Sep 17 00:00:00 2001 From: ph9kiql5e <157842898@qq.com> Date: Sun, 12 Nov 2023 08:27:58 +0800 Subject: [PATCH] Delete 'T4chang.cpp' --- T4chang.cpp | 83 ----------------------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 T4chang.cpp diff --git a/T4chang.cpp b/T4chang.cpp deleted file mode 100644 index e1db9c7..0000000 --- a/T4chang.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include -struct stud - { - int num; - int clas; - char name[10]; - float math; - float phy; - float eng; - char modf; - }; -int main() -{ - - struct stud stu[10]={{10001,11,"Zhang",99.5,88.5,89.5}, - {10002,12,"Yang",77.9,56.5,87.5}, - {10003,11,"Liang",92.5,99.0,60.5}, - }; - struct stud t={}; - struct stud ch[1]; - scanf("%d %d %s %f %f %f",&ch[0].num,&ch[0].clas,ch[0].name,&ch[0].math,&ch[0].phy,&ch[0].eng); - struct stud*p=stu; - struct stud*p1=ch; - void change(struct stud stu[],struct stud ch[]); - change(p,p1); - int i,j; - for(i=0;stu[i].num!=0;i++) - { - if(stu[i+1].num!=0) - { - for(j=i+1;stu[j].num!=0;j++) - { - if(stu[i].clas>stu[j].clas) - { - t=stu[i];stu[i]=stu[j];stu[j]=t; - } - } - } - } - for(i=0;stu[i].num!=0;i++) - { - if(stu[i+1].num!=0) - { - for(j=i+1;stu[j].num!=0&&stu[i].clas==stu[j].clas;j++) - { - if(stu[i].math+stu[i].phy+stu[i].eng