commit 91849d9bee8440dd1b39d202b2d35a463317793a Author: 18408000528@stu.hut.edu.cn <18408000528@stu.hut.edu.cn> Date: Mon Jan 7 19:58:32 2019 +0800 first diff --git a/课程设计.cpp b/课程设计.cpp new file mode 100644 index 0000000..c2ed67a --- /dev/null +++ b/课程设计.cpp @@ -0,0 +1,82 @@ +#include +#include +#include +#include +typedef struct exam_system//¶¨ÒåÁ´±í +{ + char problem[500]; + char answer1[150]; + char answer2[150]; + char answer3[150]; + char answer4[150]; + char key; + struct exam_system *next; +}EXAM; +void Answer(int n,EXAM *fp); //´ðÌ⺯Êý£º¸ºÔðÕû¸öÑ¡ÏîÒ»µÄÄ£°å +void Output(EXAM *fp,int i); //³öÌ⺯Êý£º¸ºÔðÒÀ´Îµ÷³öÌâÄ¿ +int Judge(EXAM *fp,char m); //ÅÐ¾íº¯Êý£º¸ºÔðÅжϻشðÓëÕýÈ·´ð°¸ÊÇ·ñÏàͬ +void Input(EXAM *fp); //´æÌ⺯Êý£º¸ºÔðÒÀ´ÎÊäÈëÌâÄ¿ +void Read(EXAM *fp); //Îļþº¯Êý£¬¸ºÔð´ò¿ªÌâ¿âÎļþ²¢Ö¸ÏòÖ¸Õë +EXAM *create(EXAM *fp); //´´½¨Á´±í +EXAM *InsertNode(EXAM *head,EXAM*s); //²åÈëÁ´±í +int main() +{ + EXAM exam[20]; + EXAM s; + EXAM *head; + int op,n; + printf("\t\t**********µ¥ÏîÑ¡ÔñÌâ±ê×¼»¯¿¼ÊÔϵͳ**********\n"); + printf("\t\t* 1.¿ªÊ¼´ðÌâ *\n"); + printf("\t\t* 2.¸üÐÂÌâ¿â *\n"); + printf("\t\t* 3.Í˳ö *\n"); + printf("\t\t********************************************\n"); + printf("\t\tÇëÊäÈëÑ¡Ï"); + scanf("%d",&op); + switch(op) + { + case 1: + printf("ÇëÊäÈëÄãÐèÒªµÄÌâÁ¿£º"); + scanf("%d",&n); + Answer(n,&exam); + break; + case 2: + system("cls"); + Input(&s); + head=createLinkedList(&exam); + head=InsertNode(head,&s); + break; + case 3: + exit(0); + break; + default:printf("ERROR!!PLEASE ENTER AGAIN!!"); + } + return 0; +} +void Answer(int n,EXAM *fp) +{ + +} +void Output(EXAM *fp,int i) +{ + +} +int Judge(EXAM *fp,char m) +{ + +} +void Input(EXAM *fp) +{ + +} +void ReadfromFile(EXAM *fp) +{ + +} +EXAM *createLinkedList(EXAM *fp) +{ + +} +EXAM *InsertNode(EXAM *head,EXAM*s) +{ + +}