From 25b18b1b637cb1f28bd3ff4c3b860d84b7a03898 Mon Sep 17 00:00:00 2001 From: pax8rtyjc <1650940787@qq.com> Date: Sun, 5 Nov 2023 20:02:12 +0800 Subject: [PATCH] Delete '5.cpp' --- 5.cpp | 111 ---------------------------------------------------------- 1 file changed, 111 deletions(-) delete mode 100644 5.cpp diff --git a/5.cpp b/5.cpp deleted file mode 100644 index 58e8b7e..0000000 --- a/5.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include -#include -#include -void delete1(); -void order(); -void output(); -int sum=2; -struct stu -{ - int Id; - int clas; - char name[100]; - float score1; - float score2; - float score3; - float score; -}stu[100]={{10001,11,"Zhang",99.5,88.5,89.5,277.5}, -{10002,12,"Yang",77.9,56.5,87.5,221.9}, -{10003,11,"Liang",92.5,99.0,60.5,252}}; -int main() -{ - while(1) - { - order(); - output(); - delete1(); - } -} -void delete1() -{ - char b[100]; - scanf("%s",&b); - int c=-56356,f=1,len1,len=strlen(b); - if(b[0]>'0'&&b[0]<'9') - { - c=0; - for(int k=0;kstu[j].clas) - { - stu[sum+1]=stu[i]; - stu[i]=stu[j]; - stu[j]=stu[sum+1]; - } - else if(stu[i].clas==stu[j].clas) - { - if(stu[i].Id>stu[j].Id) - { - stu[sum+1]=stu[i]; - stu[i]=stu[j]; - stu[j]=stu[sum+1]; - } - } - } - } -} -void output() -{ - for(int i=0;i<=sum;i++) - { - printf("%d %d %s %.1f %.1f %.1f \n",stu[i].Id,stu[i].clas,stu[i].name,stu[i].score1,stu[i].score2,stu[i].score3); - } -} - -