類比學生選課系統

來源:互聯網
上載者:User
//類比學生選課系統的實現,大家不要笑話,發這樣的東東出來。哈哈。 #include #include "Elective.h" using namespace std; //課程資訊 struct infoCouse{ int counter;//學生數計數器; int CouseNum; int stuNum; char CouseName[50]; char teach[30]; char student[10][30]; }; struct infoCouse temp,t; List Couse; //列印課程資訊 void printCouse() { int len,i; //struct infoCouse temp; len=Couse.Length(); if(len==0) { cout<<"暫無課程資訊,請先返回主菜單輸入"<>IC; if(IC!=1 && IC!=2) { //cout<<"hahha"<>IC; Hop(); } else if(IC==2) { exit(1); } break; } ///////////////////////////////////////////////////////////////////////////// ///菜單2 else if(IC==2) { printCouse(); //cout<<"1"測試 cout<<"若要選擇某門課程,請輸入課程編號"<>IC; if(IC!=1 && IC!=2) { //cout<<"hahha"<>name; for(int k=0;k<50; k++) temp.student[temp.counter][k]=name[k]; //cout<>IC; // Hop(); } else { cout<<"你輸入的課程編號不存在,請重新輸入."<>IC; Hop(); } else if(IC==2) { exit(1); } break; } ///////////////////////////////////////////////////////////////////////////// ///菜單3 else if(IC==3) { printCouse(); //cout<<"1"測試 cout<<"若要查看某門課程學生情況,請輸入課程編號"<>IC; if(IC!=1 && IC!=2) { //cout<<"hahha"<>IC; Hop(); } else if(IC==2) { exit(1); } break; } ///////////////////////////////////////////////////////////////////////////// ///菜單4 else if(IC==4) { //printCouse(); //cout<<"1"測試 cout<<"若要增加課程,請輸入課程資訊"<>IC; if(IC!=1 && IC!=2) { char cName[50]; int cNum; char cTeacher[50]; temp.counter=0;//!~!!!~~~~~~~~~~~~~~~~~!!!!~!~!~!~!~!~! cout<<"請輸入課程名稱:"; cin>>cName; for(int idx=0;idx<50;idx++) temp.CouseName[idx]=cName[idx]; cout<

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.