學(xué)生管理系統(tǒng)源代碼_第1頁(yè)
學(xué)生管理系統(tǒng)源代碼_第2頁(yè)
學(xué)生管理系統(tǒng)源代碼_第3頁(yè)
學(xué)生管理系統(tǒng)源代碼_第4頁(yè)
學(xué)生管理系統(tǒng)源代碼_第5頁(yè)
已閱讀5頁(yè),還剩8頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、 nclud io eam incl de stdlib 、h?inc ude sr ng、h# clud malloc 、h?dfineINI _SIZ 0 defi IN E_SIZE 10 #d fine SUBJEC _NUM 3#defin LN?vod how_Sta t();?oi sh _able ();?v i ddR cr() ;?void In o_delete (); ?void eeeRe rd( );?vod el t_Num( int); ?vid el te_Nam (har tarName );?vo d Inf _mo iy(); ?vo d modi R

2、r();voi m di y_Nm ( int);v d i yName (ca) ;?voi I o_ uery( );void queryRecord ( );?void quer Num(int );?vod ue y_Name (char ); ?oi dsplay ();?void quit() ;?vi nu M( );?cha subject SUB E T NM str ct STUD NT?in m;ha name 0 ;?har sex ;fl atsco e UBJECT_ UM ;;? /struct S UE tuLEN + 1 ;?/STUDEN record =

3、(S UDE T*)ma loc ( izeof(S UD NT )*INIT_ ZE);?i ta st Num 0; /?S ENT r ord(STUD NT )mlloc ( sizeof(ST D NT ) INIT S ZE); ;? t mai () ? / cor = (STUD NT*)malloc(si eo (ST DENT) IIT_ IE); ? /STUDENT record = ( TU ENT* )mal oc( ieof(STU E T)*INI _SIZE );?/* ? rco d 1、nm = 001; ?tr py(re ord 、 name , Ja

4、son ” ); ?r or 1、sex M;reod1、 co e 0 5、0;r cord1 、 score =90、0;rec rd 1、 cr 2 95、 0;?record 、num = 100 ;? strcpy( ecord 2、nam , rry);eo 2、 sx = M;?eco 2、 score 0 85、0;eco d、 score 1 = 90、0;? ecord 、 score2 = 95 、 0;?recor 3、num = 1003 ;? strcpy(record 3、n e,Jsse”);? rcor 3 、 sex = F ; eco d3 、score0

5、 = 5、0;? ecor 、 score 1 = 9 、; ? record 3、 cre2 =9、 ; /?/Ino_mod fy();int y;co tke ; ?if( ey= ) ? ?ci a g tNum;nttagetNum ;?cout?oif_um (t getN m) ;?cou endl; ?displa ();? ? f(key=) ? ?char t get ae20 ;co ta ge Na ;mod y_N me( a etame) ; ?cutend ;display ();? i( k = ) ?exit(0) ;?*/? show_S at(); ?me

6、 u_ D( );return 0 ; idshow_S rt() /cout end ;co t”* * * * * * ed; ? ut endl ;co t” endl ;? utco t” end ;”endl; ?cout ae b Jason” e dl;out ” * * * * * * * end ; ?/、 oi _Table( )? out ” ” t ” c tts je ” su ject t sujec 2;cout l; ?v idm n _CMD () ? t key; ?w il( 1)cut”、co ”、 t3 、 out 4 、cout ”5、en l; d

7、l;endl ;e d; edl; ?cou key ;whi( )?if((ke out 1) |(key( 1 ) 6)?” endl ;?: ” ;ntke;cou ey;else?rea ;? w ch( ey )? ca e1:addRe o();bea;c 2:dlet Record( ); ra ;? case 3 :m fyR cor (); k;?case :query ecord( ); rea ; ase :dis ay();break ;cas :quit ();break ;?/ / / / / / / / / / / / / / / /?/?vo dRecord()

8、 ?if(st Num = 0) ? cout endl ;?stuNum +;? elcou INIT SIZE )cout en l; ? ec d =(STUDE T*)raloc( ec d,(INIT_ IZE N E_ IZ) izo( STU ENT) );?cout ”!” dl;? ?cout en l;cout (Y/N ) : ;? charcho ;? chi;? if( ch i = Y ) |( c oi = ))?outreco dstuN 、n e;?cut stu um、 sex ;?int i;fo(i =;i SUB ECT_ UM ;i+)? u” su

9、bject ireco d tuNum 、 core ; ?f((cho =N )|(c i = n))?co ” en l;?cut edl;cout suNum ! e l;couten l;?/ / / / / / / / / / / / / / / / / / / / / / ? / /dele eRecordvoidI _de et() ?ou ”: endl; ? c ut1 、 edl;cout ”、 nd; ? cout 3、 e l; ? ?v d eleteRecor ()int key;ot endl ; ? Ifo delete ( );cout : ;? cin ke

10、;? i(ke = 1)? t targ t m;cout ar Nu ;?de et_Num (targe Num); ?odl;? (key 2) ? ha targetNam 20 ;co ”: ;ci argetN me ;?elete Name(target me) ;?coutendl ;if(key = 3) le(1)?m _CM (); ?/? i delete m(int ar m)ini;? for(i= 1; = stuNum ;i+ )if( ecordi 、nm = ar um) ? ?/? /、 2、? ?if(i stu u)?cout ”: ” ndl ;?s

11、h Table () ;coutrec rdi 、um t r ord 、ame ” cord 、sex t”? rdi 、score0reco di、sco e” t” recrd i、 core ;?co t en l;out e dl: ” endl ;sho _Table() ;for( int = 1; = tuN m - 1; + )?cou ecor i 、 t record i、 name ”t reordi 、sex;for(int j;SUBJECT M; +)?cout t rec rd、 or j;?c ten l;?/ ?co tendl;stuNum -; ?cu

12、stuNu ”;?2/?、?if(i!= st Nu)out ”s ow_Ta le();: ” edl;cout rcor i、 n m trcor i、 ame ” t” rec rdi、 sex ” ? eco d、 sc re0 t eco di、score 1 t record i、 sco e 2;for ( nt j = eco dj-1 1; j t um ;j +) ?=rec rdj ;?/cot n l;co o (nt i = ;i =: e d ; ?stuNu -1;i+)?s w_Table ( ); outrecordi 、num trecor i、am tre

13、co i、sex; ?for( nt = 0;j UB ECT_NUM;j )cou t ” record i、 sco j; ?cout end ; ? ?/* tuNu -;c ut” uNum?cou endl; ?*/? ? tu ;co t” stu uout endl; ? ?/*?/ i d e e N e( har tar me )? n i;? for(i= ;i stuN m ; +)? ?(srcmp( re ord i、 me , arNam ) = 0)?/ 1、/ 2、?/if(i s uNum) ?cot: ” end ; ?how_T ble ();core r

14、di 、num ” rco di、na t re rdi 、 se t r c di、 soe0record 、 sco e1 t r cord 、 sco e2;cout end ; ?cout en l : enl;show_ able( ); r(int i= 1 ;i = st um 1;i+)?cout rcor i、 um t record 、 ame t recordi 、 se; ? (int j ;j S BJC _ M;j+)cout ” rco d i、 co ej;?co t ed;?/if(i!= stu um )?cout : en l;show able ();?

15、cout rco di、 num ” t or i、 na e reco i、 sex t ”? ec r i、 sc e 0 ” recor 、scre1 ”t ecordi 、sc re2;/?or( nt j = i 1; j= stuNu ; j+ )?reordj- = rco dj ;?coutendl; ?/cout:”endl; ?show_Table( );?for(inti = 1 ;i = stuNum 1; +)?cout record i、num t eco 、 name ”t r ord i、sex ; ?for(int j =0;j S BJE T_NUM ;j+

16、)?ou t r cordi 、 c rej;?co t e; out endl ;v ddele e_N me (catarN )? nt i ; or(i 1;i t N; i+ ) ? ? /1、/2、/ if ( t mp(re ord i、n e, tarN me) = 0) ?if( =stu um )cut: ” n ;?s w able ();cotrec rdi、num ” tr cordi 、name t ”rec r i、 s trecordi 、sc re0” t” rec rdi 、 sc t” r codi 、 sc r 2; ?cout nd ; ?cout ”:

17、 ” ndl;?show_ ab e();for( inti 1;i=stuN ; i+) ?cou reod、 nm” rec ri、nme ” t record i、 ex;for(in j= 0;j S BJEC NUM ;j+ )?cout t reco 、score ;co t e ;? ?/stuNum- ;out st Num ;?coutend ;?*/? ?/?couti( i != uum )?e l;sow abl ( );coutrecordi 、numt record i、name trec ri、” t;cou record 、score0 ” eco di、 so

18、re 1” ec rd 、sco ; ?out end ; or( t j = i+1 ; j = s uN m;j )reco dj 1 = ecord ;? /、cou end ;?cou : ”en;? ow Ta l() ;?for( nt i =1;i = stuN 1;i+)?cout recordi 、 um ”trecordi 、nm” t reodi、x;?fo (int 0;j UB E _NUM ;j+)? ?o” trecordi 、sco j;? outen l;*?stNum -;cut ” tuNum c tendl ;*/?stuN m ; ?cout t Nu

19、m ”;cout ndl; ? ?* * * * * * * * * * * * * * * * r c di 、 um ; * * * * * * * * * * * * * * * / oid I fo_modi y() ?c t” : endl;c u” 1、ndl ;cout 2、” en; t 3、e l;?v d mod f eco d() ?inte;cout endl;Inf modify () ;? cu” cin ke ;?:;/if(ky =1)? arget m; out : ;ci targ u;?od f_Nu ( argetN m);ou endl ;?/di p

20、lay(); ? /i( y cou ta get am ;mo i _Na e( argetN e);?cout endl ;?/di play () ;?if( key = ) ? wh e(1)?menu_C D();? ?/?void odify_ um (inttarNum)i?i; ? for (i = 1; i= st Num ; +)( record 、 num = tarNu ) ?cou endl ”cu : ;?cout ec r i、sex;?cout ”su ject0rec di 、 score 0;cou ” subject 1 : ;?cn ecord i、so

21、re1 ;?cut sb e t2r cor 、 cor ;? ?vod mod fy Name ( cha tarName )? i i;? or(i 1; i = stu m; +) ? ? if( strc p(eord i、 name ,tarNa e) = 0) ? ouen l”:” recordi 、 num ; ?cut: ;?ci recordi 、 name ;?co”: ;?cinreco di、 s ;?cot” ubject 0 ”:;ci recor i、scor 0 ;co t” sub ect1rec rdi、sc re1; ?cut ecor i、 sc e2

22、 ; ?voi Info query ()?out : ” ndl;? cout”1、” endl; ?cot 2、 ndl; ? ou 3、endl ;?/quer Re ordv ue yRecor () nt key; ? cut l;Info_query ();? coutkey ;?if( e =1)? n argetNum ;? u”: ; i age um; ? ery u( target um ); out endl;i( ke = ) ? ?ch tar etN me2 ;cot:;? rgetN m; ? uey_Name ( argetN e);?co endl;?/ 、if( e = 3) ? whil( 1)?mnu MD ();?voidq ry_Nu (int tarN

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論