freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言課程設計報告(宿舍管理系統(tǒng)-在線瀏覽

2024-11-08 02:19本頁面
  

【正文】 女 20 通信工程 學生總?cè)藬?shù) 3 人,其中男生 1 人,女生 2 人。 對調(diào)試中主要問題進行總結(jié) 調(diào)試過程中,經(jīng)常會出現(xiàn)輸入或顯示為亂碼的情況,這往往是上下定義的數(shù)據(jù)類型不同或定義 數(shù)組長度不夠所造成的。 像這類問題只要把數(shù)據(jù)類型都定義成字符型,并且定義一個合理的數(shù)組長度往往都能解決。在運用“ rt+”打開文件并對某一數(shù)據(jù)進行刪除后,往往顯示會多顯 示一行數(shù)據(jù)。后來我先用“ rt”打開文件并讀取文件中的數(shù)據(jù),然后再用“ wt”打開原文件將刪除后的數(shù)據(jù)重新寫入文件,最終檢測運行成功??梢苑奖愕倪M行住宿 學生信息的管理。第三,它也具有安全性,在進入學生信息管理系統(tǒng)之前要求輸入賬號和 密碼,所以非常安全,不會造成信息的外泄??梢栽诿艽a模塊中改為回顯“ *”形式,并且可以對密碼進行算法加密,這樣更能確保信息的安全。在最初編寫的幾天里出現(xiàn)了這樣那樣的錯誤 一大堆,這主要是由于我對基礎知識掌握不扎實所造成的。 程序的編寫總歸是一件費時費力的事情,但只要我們認真編寫和調(diào)試最后總能成功。 參考文獻:《C語言程序設計》(第二版) 王曙燕 科學出版社 七、源程序清單 include include include include define N 900 struct cipher {char account[6]。 }m[10]。 char account[6]。 FILE *fp1。 printf ( * 1. 登陸 *\n)。 printf ( *************************************\n)。choice)。 switch(choice) {case 1: fp1=fopen(,rt)。 getchar()。 } fno=fileno(fp1)。 fnum=fsize/sizeof(struct cipher)。 system(cls)。 gets(account)。 gets(code)。ifnum。m,sizeof(struct cipher),1,fp1)。 else flag1=1。 else flag2=1。amp。 printf(登陸成功! \n)。 return 1。 k++。 system(pause)。 case 2:fp1=fopen(,at+)。按任意鍵退出! )。 exit(1)。 getchar()。 gets(m[0].account)。 gets(m[0].code)。 gets(code1)。m[0],sizeof(struct cipher),1,fp1)。 flag=0。 getchar()。 } }while(flag==1)。 getchar()。 break。 } struct st_message /*學生信息 */ { char name[20]。 /*宿舍號 */ char num[10]。 /*性別 */ char age[4]。 /*專業(yè) */ char classs[8]。 sort_message() /*排序模塊 */ {int i,j,fno,fsize,fnum。 fp=fopen(,rt+)。按任意鍵退出! )。 exit(1)。 fsize=filelength(fno)。 for(i=0。i++) fread(amp。 for(i=0。i++) for(j=i+1。j++) if(strcmp(st[i].num,st[j].num)0) {t=st[i]。 st[j]=t。 for(i=0。i++) fwrite(amp。 fclose(fp)。 char choice。 fp=fopen(,at+)。按任意鍵退出! )。 exit(1)。i++) { system (cls)。 printf(請輸入學生姓名: )。 printf(\n 請輸入學生班級: )。 printf(\n 請輸入學生宿舍號: )。 printf(\n 請輸入學生學號: )。 printf(\n 請輸入學生性別: )。 printf(\n 請輸入學生年齡: )。 printf(\n 請輸入學生專業(yè): )。 fwrite(amp。 printf(輸入成功! \n 是否繼續(xù)錄入 (Y/N)?)。 if(choice==39。||choice==39。) continue。 break。 char choice。 fp=fopen(,at+)。按任意鍵退出! )。 exit(1)。i++) {struct st_message st[N]。 getchar()。 gets(st[i].name)。 gets(st[i].classs)。 gets(st[i].dorm)。 gets(st[i].num)。 gets(st[i].sex)。 gets(st[i].age)。 gets(st[i].major)。st[i],sizeof(struct st_message),1,fp)。 choice=getchar()。y39。Y39。 else {fclose(fp)。 } } } revise_message() /*修改模塊 */ {int i,choice,flag,fno,fsize,fnum。 FILE *fp。 fno=fileno(fp)。 fnum=fsize/sizeof(struct st_message)。 gets(s)。 gets(re_name)。ifnum。st[i],sizeof(struct st_message),1,fp)。 printf(學號 姓名 班級 宿舍號 性別 年齡 專業(yè)\n)。 printf(%8s %6s %4s %6s %4s %4s %20s\n,st[i].num,st[i].name, st[i].classs,st[i].dorm,st[i].sex,st[i].age,st[i].major)。 printf( \n)。 printf( \n)。 printf( \n)。 printf( \n)。 scanf(%d,amp。 switch(choice) {case 1:printf(\n 請輸入修改后的學號: )。break。 scanf(%s,st[i].name)。 case 3:printf(\n 請輸入修改后的班級: )。break。 scanf(%s,st[i].dorm)。 case 5:printf(\n 請輸入修改后的性別: )。break。 scanf(%s,st[i].age)。 case 7:printf(\n 請輸入修改后的專業(yè): )。break。 } getchar()。 printf(\n 修改后的學生信息 \n\n)。 printf(\n)。 rewind(fp)。 fwrite(amp。 fclose(fp)。 } } if(i==fnum) printf(\n 該學生信息不存在! )。 choice=getchar()。Y39。y39。 system(pause)。 }while(flag==1)。 } delete_message() /*刪除模塊 */ {int i,j,choice,fno,fsize,fnum。 FILE *fp。 getchar()。 if(fp==NULL) {printf(\n\n*****庫存文件不存在!請先建立。 getchar()。 } fno=fileno(fp)。 fnum=fsize/sizeof(struct st_message)。ifnum。st[i],sizeof(struct st_message),1,fp)。 gets(d_num)。 for(i=0。i++) {if(!strcmp(d_num,st[i].num)) {printf(\n 該學生信息 \n\n)。
點擊復制文檔內(nèi)容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1