From 9ef33cb31225f8dd930ac54a8944124045f92bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?13873884359=27git=20config=20--global=20user=2Ename=20?= =?UTF-8?q?=E5=88=98=E5=AE=87=E5=AE=BD=E2=80=9C?= <1634704423@qq.com> Date: Mon, 7 Jan 2019 14:54:55 +0800 Subject: [PATCH] first commit --- 主函数.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 主函数.c diff --git a/主函数.c b/主函数.c new file mode 100644 index 0000000..1252eba --- /dev/null +++ b/主函数.c @@ -0,0 +1,61 @@ +#include +#include +#include +#define LEN 20 /* ѧºÅºÍÐÕÃû×î´ó×Ö·ûÊý */ +#define N 1000 /* ×î´óѧÉúÈËÊý*/ +struct record /*½á¹¹Ìå*/ +{ +char id[LEN+1]; /* ѧºÅ */ +char name[LEN+1]; /* ÐÕÃû */ +int age; /* ÄêÁä */ +char sex[3]; /* ÐÔ±ð */ +char birth[LEN+1]; /* ³öÉúÄêÔ */ +char add[30]; /* ¼ÒÍ¥µØÖ· */ +char tel[LEN+1]; /* µç»°ºÅÂë */ +char email[30]; /* µç×ÓÓʼþµØÖ· */ +}stu[N]; +int n,m; /* ¶¨ÒåÈ«¾Ö±äÁ¿ nΪµ±Ç°Ñ§ÉúÊý m±íʾÿ´ÎÔö¼ÓµÄѧÉúÊý */ +void refresh();/* µ¼ÈëÐÅÏ¢º¯Êý */ +void seek();/* ²éÕÒÐÅÏ¢º¯Êý */ +void modify();/* ÐÞ¸ÄÐÅÏ¢º¯Êý */ +void add();/* Ôö¼ÓÐÅÏ¢º¯Êý */ +void dele();/* ɾ³ýÐÅÏ¢º¯Êý */ +void show();/* ÏÔʾÐÅÏ¢º¯Êý */ +void save();/* ±£´æÐÅÏ¢º¯Êý */ +int main() +{ +while(1) +{ +int num; +printf("\t\t\t\t ×¢ÒâÊÂÏî \n"); +printf("\t\t Ò»£ºµÚÒ»´ÎÔËÐÐÇëÏÈË¢ÐÂϵͳ£¡£¡£¡£¡ \n"); +printf("\t\t ¶þ£ºÔö¼ÓѧÉúÐÅÏ¢ºóÎñ±Ø±£´æÐÅÏ¢£¡£¡£¡£¡ \n\n"); +printf("\t\t\t ϵͳ¹¦Äܲ˵¥ \n"); +printf("\t\t\t 1.Ë¢ÐÂѧÉúÐÅÏ¢ \n"); +printf("\t\t\t 2.²éѯѧÉúÐÅÏ¢ \n"); +printf("\t\t\t 3.ÐÞ¸ÄѧÉúÐÅÏ¢ \n"); +printf("\t\t\t 4.Ôö¼ÓѧÉúÐÅÏ¢ \n"); +printf("\t\t\t 5.°´Ñ§ºÅɾ³ýÐÅÏ¢ \n"); +printf("\t\t\t 6.ÏÔʾµ±Ç°ÐÅÏ¢ \n"); +printf("\t\t\t 7.±£´æµ±Ç°Ñ§ÉúÐÅÏ¢ \n"); +printf("\t\t\t 8.Í˳öϵͳ \n"); +printf("ÇëÑ¡Ôñ²Ëµ¥±àºÅ:"); +scanf("%d",&num); +switch(num) +{ + +case 1:refresh();break; +case 2:seek();break; +case 3:modify();break; +case 4:add();break; +case 5:dele();break; +case 6:show();break; +case 7:save();break; +case 8:exit(0); +default:printf("ÇëÔÚ1-8Ö®¼äÑ¡Ôñ\n"); +} +system("pause"); +system("cls"); +} +return 0; +}