亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

transit-stu

  • 學生成績guanli

    #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 int iNumOfStu=0; struct score   {   float math;   float english;   float computer;   }; struct student   {   int number;   char name[20];   struct score sco;   float average;   }; struct student stu[N]; void print_menu(void);//輸出菜單 void choosemenu(void);//菜單選擇 void input_student1(int);//輸入學生信息 void input_student2(void);//輸入總函數 void input_student3(int &,int);//判斷學號是否重復 void input_student4(int,int);//覆蓋原信息 void sort_student3(student s[],int);//按照英語成績排序 void sort_student4(student s[],int);//按照計算機成績排序 void sort_student2(student s[],int);//按照數學成績排序 void sort_student5(student s[],int);//按照平均成績排序 float input_score2(int);//計算學生平均成績 void print_student2(void);//顯示表頭 void print_student3(int);//顯示學生信息 void print_student1(int);//顯示全部學生資料 void sort_student1(void);//排序總函數 void menu(void);//菜單調度總函數 int search_student2(int);//按學號查詢學生信息并輸出 void search_student3(int);//按平均分最高查詢并輸出 void search_student1(void);//查詢總函數 void delete_student2(int,int);//刪除學生信息 void delete_student1(void);//刪除總函數 void change_student2(int);//修改學生資料 void change_student1(void);//修改總函數 void input_score3(int);//統計成績 void input_score1(void);//統計成績總函數 void print_help(void);//輸出幫助信息 void exit_student(void);//退出系統 void save_student(student *,int);//保存學生信息 void main()   {   menu();   } void save_student(student *s,int a)//保存學生信息   {   FILE *fp;     if((fp=fopen("d:\\學生信息.txt","wb"))==NULL)       {       printf("不能打開文件!\n");       }     else       {       printf("保存信息到D盤\n");       fprintf(fp,"本班所有學生具體信息如下:\r\n");       fprintf(fp,"  學號       姓名           數學成績       英語成績     計算機成績     平均成績\r\n");       for(int i=0;i<a;i++)         {         fprintf(fp,"%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[i].number,stu[i].name,stu[i].sco.math,stu[i].sco.english,stu[i].sco.computer,stu[i].average);         fprintf(fp,"\r\n");         }       fclose(fp);       printf("信息保存成功!\n");       }   } void exit_student(void)//退出系統   {   exit(1);   } void print_help(void)//輸出幫助信息   {   printf("本系統所能容納的最大學生數為%d人\n學生信息保存在D盤根目錄下,保存文件為“學生信息.txt”。\n感謝使用!\n",N);   } void input_score1(void)//統計成績總函數   {   int c;   c=search_student2(iNumOfStu);   printf("學號:%d\n",stu[c].number);   printf("姓名:%s\n",stu[c].name);   input_score3(c);   printf("新成績錄入成功!\n");   stu[c].average=input_score2(c);   } void input_score3(int a)//統計成績   {   printf("數學新成績:");   scanf("%f",&stu[a].sco.math);   printf("英語新成績:");   scanf("%f",&stu[a].sco.english);   printf("計算機新成績:");   scanf("%f",&stu[a].sco.computer);   } void change_student2(int a)//修改學生資料   {   printf("學號:%d----修改為:",stu[a].number);   scanf("%d",&stu[a].number);   getchar();   printf("姓名:%s----修改為:",stu[a].name);   gets(stu[a].name);   printf("數學成績:%.2f----修改為:",stu[a].sco.math);   scanf("%f",&stu[a].sco.math);   printf("英語成績:%.2f----修改為:",stu[a].sco.english);   scanf("%f",&stu[a].sco.english);   printf("計算機成績:%.2f----修改為:",stu[a].sco.computer);   scanf("%f",&stu[a].sco.computer);   } void change_student1(void)//修改總函數   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否要修改此學生信息?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     change_student2(c);       stu[c].average=input_score2(c);     printf("信息修改成功!\n");     }   } void delete_student1(void)//刪除總函數   {   int c;   c=search_student2(iNumOfStu);   getchar();   printf("是否刪除此條記錄?(“y”代表是)");   char d;   scanf("%c",&d);   if(d=='y'||d=='Y')     {     delete_student2(c,iNumOfStu);     printf("記錄已刪除!\n");     }   } void delete_student2(int a,int b)//刪除學生信息   {   for(int i=a;i<b-1;i++)     {     stu[i]=stu[i+1];     }   --iNumOfStu;   } void search_student1(void)//查詢總函數   {   printf("1、按學號查詢\n2、按平均分最高查詢\n請選擇:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       search_student2(iNumOfStu);       break;       }     case 2:       {       search_student3(iNumOfStu);       break;       }     default: break;     }   } void menu(void)//菜單調度總函數   {   print_menu();   choosemenu();   } void sort_student1(void)//排序總函數   {   printf("1、按數學成績排序\n2、按英語成績排序\n3、按計算機成績排序\n4、按平均成績排序\n請選擇:");   int c;   scanf("%d",&c);   switch(c)     {     case 1:       {       sort_student2(stu,iNumOfStu);       break;       }     case 2:       {       sort_student3(stu,iNumOfStu);       break;       }     case 3:       {       sort_student4(stu,iNumOfStu);       break;       }     case 4:       {       sort_student5(stu,iNumOfStu);       break;       }     default: break;     }   } void print_student1(int a)//顯示全部學生資料   {   printf("本班所有學生具體信息如下\n");   print_student2();   for(int i=0;i<a;i++)     {     print_student3(i);     }   } void print_student3(int a)//顯示學生信息   {   printf("%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[a].number,stu[a].name,stu[a].sco.math,stu[a].sco.english,stu[a].sco.computer,stu[a].average);   } void print_student2(void)//顯示表頭   {   printf("  學號       姓名           數學成績       英語成績     計算機成績     平均成績\n");   } void input_student4(int a,int b)//覆蓋原信息   {   stu[a]=stu[b-1];   --iNumOfStu;   } void input_student3(int &a,int b)//判斷學號是否重復   {   if(a!=0)     {     int i=0;     do       {       if(stu[a].number==stu[i].number)         {         printf("此學號代表的學生已錄入\n1、覆蓋原信息\n2、重新輸入\n請選擇:");         int c;         scanf("%d",&c);         switch(c)           {           case 1:             {             input_student4(i,iNumOfStu);             a=iNumOfStu-1;             printf("信息已替換!\n");             break;             }           case 2:             {             printf("請重新輸入學生信息:\n");             input_student1(iNumOfStu-1);             break;             }           default: break;           }         break;         }       ++i;       }       while(i<b-1);     }   } void print_menu(void)//輸出菜單   {   printf("======歡迎來到學生信息管理系統======\n");   printf("      1、輸入學生資料\n");   printf("      2、刪除學生資料\n");   printf("      3、查詢學生資料\n");   printf("      4、修改學生資料\n");   printf("      5、顯示學生資料\n");   printf("      6、統計學生成績\n");   printf("      7、排序學生成績\n");   printf("      8、保存學生資料\n");   printf("      9、獲取幫助信息\n");   printf("      10、退出系統\n");   printf("====================================\n");   printf("請選擇:");   } void input_student2(void)//輸入總函數   {   char end;   printf("請輸入學生信息(在最后一個學生信息錄入完成后以“/”結束錄入):\n");   for(int i=0;(end=getchar())!='/';i++)     {     input_student1(i);     ++iNumOfStu;     input_student3(i,iNumOfStu);     }   for(int j=0;j<iNumOfStu;j++)     {     stu[j].average=input_score2(j);     }   } void input_student1(int a)//輸入學生信息   {   printf("學號:");   scanf("%d",&stu[a].number);   getchar();   printf("姓名:");   gets(stu[a].name);   printf("數學成績:");   scanf("%f",&stu[a].sco.math);   printf("英語成績:");   scanf("%f",&stu[a].sco.english);   printf("計算機成績:");   scanf("%f",&stu[a].sco.computer);   } float input_score2(int a)//計算學生平均成績   {   return (stu[a].sco.math+stu[a].sco.english+stu[a].sco.computer)/3;   } void search_student3(int a)//按平均分最高查詢并輸出   {   int max=0;   for(int i=0;i<a;i++)     {     if(stu[max].average<stu[i].average)       {       max=i;       }     }   print_student2();   print_student3(max);   } void sort_student2(student s[],int a)//按照數學成績排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.math>stu[max].sco.math)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student3(student s[],int a)//按照英語成績排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.english>stu[max].sco.english)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student4(student s[],int a)//按照計算機成績排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].sco.computer>stu[max].sco.computer)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } void sort_student5(student s[],int a)//按照平均成績排序   {   struct student temp;   for(int i=0;i<a-1;i++)     {     int max=i;     for(int j=i+1;j<a;j++)       if(stu[j].average>stu[max].average)         {         max=j;         }     if(max!=i)       {       temp=stu[max];       stu[max]=stu[i];       stu[i]=temp;       }     }   print_student2();   for(int k=0;k<a;k++)     {     print_student3(k);     }   } int search_student2(int a)//按照學號查找學生并輸出   {   int num;   int c;   printf("請輸入要查詢的學號:");   scanf("%d",&num);   for(int i=0;i<a;i++)     {     if(num==stu[i].number)       {       c=i;       }     }   printf("此學生的信息是:\n");   print_student2();   print_student3(c);   return c;   } void choosemenu(void)//菜單選擇   {   int i;   scanf("%d",&i);   switch(i)     {     case 1:       {       input_student2();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 2:       {       delete_student1();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 3:       {       search_student1();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 4:       {       change_student1();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 5:       {       print_student1(iNumOfStu);       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 6:       {       input_score1();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 7:       {       sort_student1();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 8:       {       save_student(stu,iNumOfStu);       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 9:       {       print_help();       printf("按回車鍵返回主菜單");       getchar();       getchar();       menu();       break;       }     case 10:       {       exit_student();       }     default: break;     }   }         運行結果:                         源文件下載地址: http://115.com/file/clnq138g#一個簡單的學生成績管理系統.rar (請將此地址復制到瀏覽器地址欄中訪問下載頁面)   #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 int iNumOfStu=0; struct score   {   float math;   float english;   float computer;   }; struct student   {   int number;   char name[20];   struct score sco;   float average;   }; struct student stu[N]; void print_menu(void);//輸出菜單 void choosemenu(void);//菜單選擇 void input_student1(int);//輸入學生信息 void input_student2(void);//輸入總函數 void input_student3(int &,int);//判斷學號是否重復 void input_student4(int,int);//覆蓋原信息 void sort_student3(student s[],int);//按照英語成績排序 void sort_student4(student s[],int);//按照計算機成績排序 void sort_student2(student s[],int);//按照數學成績排序 void sort_student5(student s[],int);//按照平均成績排序 float input_score2(int);//計算學生平均成績 void print_student2(void);//顯示表頭 void print_student3(int);//顯示學生信息 void print_student1(int);//顯示全部學生資料 void sort_student1(void);//排序總函數 void menu(void);//菜單調度總函數 int search_student2(int);//按學號查詢學生信息并輸出 void search_student3(int);//按平均分最高查詢并輸出 void search_student1(void);//查詢總函數 void delete_student2(int,int);//刪除學生信息 void delete_student1(void);//刪除總函數 void change_student2(int);//修改學生資料 void change_student1(void);//修改總函數 void input_score3(int);//統計成績 void input_score1(void);//統計成績總函數 void print_help(void);//輸出幫助信息 void exit_student(void);//退出系統 void save_student(student *,int);//保存學生信息 void main()   {   menu();   } void save_student(student *s,int a)//保存學生信息   {   FILE *fp;     if((fp=fopen("d:\\學生信息.txt","wb"))==NULL)       {       printf("不能打開文件!\n");       }     else       {       printf("保存信息到D盤\n");       fprintf(fp,"本班所有學生具體信息如下:\r\n");       fprintf(fp,"  學號       姓名           數學成績       英語成績     計算機成績     平均成績\r\n");       for(int i=0;i<a;i++)         {         fprintf(fp,"%8d%12s%14.2f%14.2f%14.2f%14.2f\n",stu[i].number,stu[i].name,stu[i].sco.math,stu[i].sco.english,stu[i].sco.computer,stu[i].average);         fprintf(fp,"\r\n");         }       fclose(fp);       printf("信息保存成功!\n");       }   } void exit_student(void)//退出系統   {   exit(1);   } void print_help(void)//輸出幫助信息   {   printf("本系統所能容納的最大學生數為%d人\n學生信息保存在D盤根目錄下,保存文件為“學生信息.txt”。\n感謝使用!\n",N);   } void input_score1(void)//統計成績總函數   {   int c;   c=search_student2(iNumOfStu);   printf("學號:%d\n",stu[c].number);   printf("姓名:%s\n",stu[c].name);   input_score3(c);   printf("新成績錄入成功!

    標簽: c語言

    上傳時間: 2019-06-09

    上傳用戶:啊的撒旦

  • ComSoc+Guide+to+Next+Generation+Optical+Transport

    Many times I have been asked to explain “ briefl y ” how SDH, SONET, and the OTN “ exactly ” work. The questions came mainly from new colleagues, stu- dents, and users of these technologies, personally or via the usenet newsgroup comp.dcom.sdh - sonet. I could have referred them to the standards documents, but to provide a more consistent and clear answer I decided to write this pocket guide. The objective of this book is that it can be used both as an introduction as well as a reference guide to these technologies and their spe- cifi c standards documents.

    標簽: Generation Transport Optical ComSoc Guide

    上傳時間: 2020-05-27

    上傳用戶:shancjb

  • Practical+Guide+to+MIMO

    The purpose of this book is to introduce the concept of the Multiple Input Multiple Output (MIMO) radio channel, which is an intelligent communication method based upon using multiple antennas. The book opens by explaining MIMO in layman’s terms to help stu- dents and people in industry working in related areas become easily familiarised with the concept. Therefore the structure of the book will be carefully arranged to allow a user to progress steadily through the chapters and understand the fundamental and mathematical principles behind MIMO through the visual and explanatory way in which they will be written. It is the intention that several references will also be provided, leading to further reading in this highly researched technology.

    標簽: Practical Guide MIMO to

    上傳時間: 2020-05-31

    上傳用戶:shancjb

  • RFID+and+Sensor+Network+Automation

    With the continued growth in the world's population, there is a need to ensure availability of enough food to feed everyone. Advances in science and technology have helped not only to increase food production, but also to reduce food wastage. However, the latter has the potential to be improved to a significant extent through appropriate matching of supply and demand, and with proper handling during storage and transit. Given the amount of food wastage that occurs after a food item leaves the “farm” on its way to the “fork,” and the availability of means to reduce such wastage, there really is no excuse for feigned ignorance.

    標簽: Automation Industry Network Sensor RFID Food and the in

    上傳時間: 2020-06-08

    上傳用戶:shancjb

  • 101條Verilog和SystemVerilog設計陷阱

    有些人喜歡收集棒球卡片,老的車輛雜志,或是橡皮小鴨,但我喜歡收集Verilog書籍。從1989年那個三孔活頁夾中保存的Gateway VERILOG-XL Reference Manual Versionl.5a復印本開始,那時的Verilog很簡單,其中只包含了一種過程獄值(那時的語言并沒有包含非阻塞賦值),它很難讓我們相信有一天能夠使用它來設計芯片,我們可以在VAX或是昂貴的Apollo工作站上進行仿真.從那開始我購買了相當多的Verilog書籍,其中包含了少量的綜合書籍,還有一份介紹硬件描述語言歷史的文本,其中的一小部分介紹了VHDL,這些書籍中大部分都是關于Verilog.但有趣的是,我并沒有花很多時間來閱讀它們,它們只是被擱置在書架上,我承認書架上擺滿了關于Verilog的書籍時,是一件令人驕傲的事情,但目光如矩的參觀者能發現它們都是全新的從未被閱讀過,擁有未使用過和未閱讀過的書籍都是無意義的,另一方面讓我沮喪,從這些書籍中只能找到很少一部分,對于工程師有價值的內容,我能否找到一本需天天使用的書籍,有利于我入門以及在工作中及時參閱。Stu和Don編寫的就是這祥一本書,了解這些技巧我花費了很多年的時間,其中內容甚至讓我懷疑,自己是否了解Verilog,在這本能提供幫助和有價值的書籍中,給出的一些知識點都是經過提煉的,相信你不會感到沮喪。如果你是一個老手,驗證這些技巧也需通過相當困難的方式,但你可笑著對自己說:“好的,我找到它了”如果你是新手,快點跟隨兩位專家開始學習吧,不要猶豫快點來參加兩位紳士提供的一次培訓課程,我保證你不會遺憾.我最喜歡的陷辨是第65條:循環是無限的,為什么?可以構建一個調試它的環境,相信我,如果建模錯誤會引發芯片損壞時,你就不會忘記錯誤為什么會出現?可惜這本書我沒有早點遇到,無疑你是幸運的,把這本書放在手邊,經常參閱,它可幫助你解決所有的模型編譯和項目設計的困難。

    標簽: verilog systemverilog

    上傳時間: 2022-07-01

    上傳用戶:

主站蜘蛛池模板: 渭南市| 贵阳市| 长葛市| 昌吉市| 昭平县| 江油市| 岳阳县| 云龙县| 高邑县| 温州市| 娱乐| 玉屏| 繁峙县| 黎川县| 高要市| 常德市| 巫溪县| 华蓥市| 安义县| 高阳县| 金湖县| 云林县| 拉孜县| 乐业县| 古田县| 顺平县| 遂昌县| 临城县| 文登市| 高阳县| 五大连池市| 柘荣县| 长海县| 达孜县| 错那县| 莱芜市| 报价| 朝阳县| 科技| 阿瓦提县| 清徐县|