From 6ba25868b1fd2ba6cce6729b94457d35176ed7a2 Mon Sep 17 00:00:00 2001 From: Cx330 <2011690092@qq.com> Date: Sat, 15 Apr 2023 13:41:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?Cx330=5F=E6=8C=89=E5=AD=A6=E5=8F=B7?= =?UTF-8?q?=E6=9F=A5=E6=89=BE=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9=E5=B9=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9F=A5=E6=89=BE=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b26e546..cf04179 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,9 @@ void SortbyName(STU stu[],int n,int m) ``` void SearchbyNum(STU stu[],int n,int m) { - + long number; + int i,j; + printf("Input the number you want to search:"); } ``` From 33622549588ed3ef100cf52f5d06497aa276c615 Mon Sep 17 00:00:00 2001 From: Cx330 <2011690092@qq.com> Date: Sat, 15 Apr 2023 14:19:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Cx330=5F=E6=8C=89=E5=A7=93=E5=90=8D?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E5=85=B8=E9=A1=BA=E5=BA=8F=E6=8E=92=E5=87=BA?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf04179..89e8582 100644 --- a/README.md +++ b/README.md @@ -249,9 +249,7 @@ void SortbyName(STU stu[],int n,int m) ``` void SearchbyNum(STU stu[],int n,int m) { - long number; - int i,j; - printf("Input the number you want to search:"); + } ``` @@ -259,7 +257,24 @@ void SearchbyNum(STU stu[],int n,int m) ``` void SearchbyName(STU stu[],int n,int m) { - + char x[MAX_LEN]; + int i,j; + printf("Input the name you want to search:"); + scanf("%s", x); + for(i=0;i