C語言課程設(shè)計(jì)報(bào)告書教小學(xué)生學(xué)英語_第1頁
C語言課程設(shè)計(jì)報(bào)告書教小學(xué)生學(xué)英語_第2頁
C語言課程設(shè)計(jì)報(bào)告書教小學(xué)生學(xué)英語_第3頁
C語言課程設(shè)計(jì)報(bào)告書教小學(xué)生學(xué)英語_第4頁
C語言課程設(shè)計(jì)報(bào)告書教小學(xué)生學(xué)英語_第5頁
已閱讀5頁,還剩24頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

C語言程序設(shè)計(jì)課程設(shè)計(jì)報(bào)告設(shè)計(jì)題目:教小學(xué)生學(xué)英語專業(yè)學(xué)號(hào)班級(jí)姓名指導(dǎo)教師2010年春季學(xué)期

設(shè)計(jì)任務(wù):C語言課程設(shè)計(jì)任務(wù)書1題目:學(xué)院教學(xué)信息管理系統(tǒng)功能:學(xué)院教學(xué)信息管理系統(tǒng),每條記錄包括位教師的職工號(hào)、姓名、職稱、性別、3門課程,教學(xué)效果綜合評(píng)分。系統(tǒng)要求實(shí)現(xiàn)以下功能:1、輸入:輸入每一位教師記錄,將其信息寫入文件中。2、顯示:顯示每位教師記錄。3、排序:按職工號(hào)或教學(xué)效果綜合評(píng)分進(jìn)行排序,并顯示。4、查找:完成按姓名或課程查找教師的相關(guān)記錄,并顯示。要求:1、用C語言實(shí)現(xiàn)程序設(shè)計(jì);2、利用結(jié)構(gòu)體數(shù)組實(shí)現(xiàn)教師信息的數(shù)據(jù)結(jié)構(gòu)設(shè)計(jì);3、系統(tǒng)的各個(gè)功能模塊要求用函數(shù)實(shí)現(xiàn);4、界面友好(良好的人機(jī)交互),程序加必要的注釋??傇u(píng)成績(jī):指導(dǎo)教師:#include<stdio.h>#include<string.h>#include<time.h>#include<stdlib.h>#defineSIZE100//聲明函數(shù),結(jié)構(gòu)voidzero();//主顯示界面voidselect((;//選擇界面voidsave();//保存界面函數(shù)voidsave1();//保存單詞函數(shù)voidsave2();//保存短語函數(shù)voidsave3();//保存短句函數(shù)voidsee();//查看詞庫界面voidsee1();//查看單詞詞庫voidsee2();//查看短語詞庫voidsee3();//查看短句詞庫voidone();//學(xué)習(xí)單詞函數(shù)voidtwo();//學(xué)習(xí)短語函數(shù)voidthree();//學(xué)習(xí)短句函數(shù)structword_list{chara1[10];charb1[10];}word[SIZE];structphrase_list{chara2[20];charb2[20];}phrase[SIZE];structsentence_list{chara3[100];charb3[100];}sentence[SIZE];//定義函數(shù)voidmain(){zero();

select();}voidzero(){printf("\n");printf("\n\n\n");printf("\t|?????????????????????????????????????????????????????????11(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t||\n")printf("\t||\n")printf("\t|快-樂-學(xué)-習(xí)—&&&—快-樂-成-長(zhǎng)|\n")printf("\t||\n")printf("\t|loveme,loveenglish|\n")rprintf("\t||\n")printf("\t||\n")printf("\t|1.開始學(xué)習(xí)|\n")printf("\t||\n")printf("\t|2.擴(kuò)大詞庫|\n")printf("\t||\n")printf("\t|3.查看詞庫|\n")printf("\t||\n")printf("\t|4.退出系統(tǒng)|\n")printf("\t||\n")printf("\t|制作者:西安理工大學(xué)王軍禮|\n")printf("\t||\n")printf("\t|2?????????????????????????/S,?????????????????????/S,????????"|\n")}voidselect(){inta;printf("\t\t請(qǐng)選擇:");scanf("%d",&a);switch(a){case1:one();break;case2:save();break;case3:see();break;case4:exit(0);default:printf("error\n");}}voidsave(){intb;printf("\n");printf("\n");printf("\t\t|"?????????????????????????????????????????????1I(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t||\n")printf("\t\t|快-樂-學(xué)-習(xí)—&&&—快-樂-成-長(zhǎng)-|\n")printf("\t\t||\n")printf("\t\t|loveme,loveenglish|\n");printf("\t\t||\n")printf("\t\t|1.記錄單詞|\n")printf("\t\t||\n")printf("\t\t|2.記錄詞組|\n")printf("\t\t||\n")printf("\t\t|3.記錄句子|\n")printf("\t\t||\n")printf("\t\t|4.返回|\n")printf("\t\t||\n")printf("\t\t|"V????????????????????????????????????????????A|\n")printf("\t\t請(qǐng)輸入:");scanf("\n%d",&b);switch(b){case1:save1();break;case2:save2();break;case3:save3();break;case4:zero();select();break;default:printf("error\n");}}voidsave1(){inti,j,m1;FILE*fp1,*fi1;if((fp1=fopen("word_list","r"))==NULL){fp1=fopen("word_list","wb");fclose(fp1);}if((fi1=fopen("c1","r"))==NULL){m1=0;fi1=fopen("c1","wb");fwrite(&m1,sizeof(int),1,fi1);fclose(fi1);}if((fi1=fopen("c1","rb"))!=NULL){fi1=fopen("c1","rb");fread(&m1,sizeof(int),1,fi1);i=m1;}for(i;i<=SIZE;i++){if(m1>=(SIZE-1)){printf("\n已存滿,不能存入數(shù)據(jù)");break;}else{printf("請(qǐng)輸入英文單詞:");getchar();gets(word[i].a1);printf("\n請(qǐng)輸入中文詞語:");gets(word[i].b1);if((fp1=fopen("word_list","ab"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&word[i],sizeof(structword_list),1,fp1)!=1)

printf("filewriteerror\n");fclose(fp1);m1=m1+1;if((fi1=fopen("c1","wb"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&m1,sizeof(int),1,fi1)!=1)printf("filewriteerror\n");fclose(fi1);\n");\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");\n");\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");??????????????????????????????????????????????I1(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");請(qǐng)輸入:");記錄成功!是否繼續(xù)記錄單詞1.繼續(xù)---2.退出---}}zero();select();}voidsave2(){inti,j,m2;FILE*fp2,*fi2;if((fp2=fopen("phrase_list","r"))==NULL){fp2=fopen("phrase_list","wb");fclose(fp2);}if((fi2=fopen("c2","r"))==NULL){m2=0;fi2=fopen("c2","wb");fwrite(&m2,sizeof(int),1,fi2);fclose(fi2);}if((fi2=fopen("c2","rb"))!=NULL){fi2=fopen("c2","rb");fread(&m2,sizeof(int),1,fi2);i=m2;}for(i;i<=SIZE;i++){if(m2>=(SIZE-1)){printf("\n已存滿,不能存入數(shù)據(jù)");break;}else{printf("請(qǐng)輸入英文短語:");getchar();gets(phrase[i].a2);printf("\n請(qǐng)輸入中文短語:");gets(phrase[i].b2);if((fp2=fopen("phrase_list","ab"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&phrase[i],sizeof(structphrase_list),1,fp2)!=1)printf("filewriteerror\n");fclose(fp2);m2=m2+1;if((fi2=fopen("c2","wb"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&m2,sizeof(int),1,fi2)!=1)printf("filewriteerror\n");fclose(fi2);printf("\t\t\n")printf("\t\t\n")printf("\t\t|"V??????????????????????????????A?/??????????????I1(\~~~~~~~~~~~~~~|\n")printf("\t\t||\n")printf("\t\t|記錄成功!是否繼續(xù)記錄單詞|\n")printf("\t\t||\n")printf("\t\t||\n")printf("\t\t|1.繼續(xù)---|\n")printf("\t\t||\n")printf("\t\t|2.退出---|\n")printf("\t\t||\n")printf("\t\t||\n")printf("\t\t|"V??????????????????????????????A?/??????????????I1(\~~~~~~~~~~~~~~|\n")printf("\t\t請(qǐng)輸入:");scanf("%d",&j);if(j==1);elseif(j==2)break;}}zero();select();}voidsave3(){inti,j,m3;FILE*fp3,*fi3;if((fp3=fopen("sentence_list","r"))==NULL){fp3=fopen("sentence_list","wb");fclose(fp3);}if((fi3=fopen("c3","r"))==NULL){m3=0;fi3=fopen("c3","wb");fwrite(&m3,sizeof(int),1,fi3);fclose(fi3);}if((fi3=fopen("c3","rb"))!=NULL){fi3=fopen("c3","rb");fread(&m3,sizeof(int),1,fi3);i=m3;}for(i;i<=SIZE;i++){if(m3>=(SIZE-1)){printf("\n已存滿,不能存入數(shù)據(jù)");break;}else{printf("請(qǐng)輸入英文短句:");getchar();gets(sentence[i].a3);printf("\n請(qǐng)輸入中文短句:");gets(sentence[i].b3);if((fp3=fopen("sentence_list","ab"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&sentence[i],sizeof(structsentence_list),1,fp3)!=1)printf("filewriteerror\n");fclose(fp3);m3=m3+1;if((fi3=fopen("c3","wb"))==NULL){printf("cannotopenfile\n");exit(0);}if(fwrite(&m3,sizeof(int),1,fi3)!=1)printf("filewriteerror\n");fclose(fi3);printf("\t\t\n");printf("\t\t\n");printf("\t\t|??????????????????????????????????????????????I1(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t||\n");printf("\t\t|記錄成功!是否繼續(xù)記錄單詞|\n");printf("\t\t||\n");printf("\t\t||\n");printf("\t\t|1.繼續(xù)---|\n");printf("\t\t||\n");printf("\t\t|2.退出---|\n");printf("\t\t||\n");printf("\t\t||\n");printf("\t\t|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");請(qǐng)輸入:");printf("\t\tscanf("%d",&j);if(j==1);請(qǐng)輸入:");elseif(j==2)break;}}zero();select();}voidsee(){intj;printf("\t\t\n")printf("\t\t\n")printf("\t\t|??????????????????????????????????????????????11(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t||\n")printf("\t\t|???請(qǐng)選擇記憶類型???|\n)printf("\t\t||\n")printf("\t\t||\n")printf("\t\t|1.記憶單詞|\n")printf("\t\t||\n")printf("\t\t|2.記憶短語|\n")printf("\t\t||\n")printf("\t\t|3.記憶句子|\n")printf("\t\t||\n")printf("\t\t|4.退出|\n")printf("\t\t||\n")printf("\t\t|■V?????????????????????????????????????????????11(\~~~~~~~~~~~~~~|\n")printf("\t\t請(qǐng)輸入:");scanf("%d",&j);if(j==1)see1();elseif(j==2)see2();elseif(j==3)see3();elseif(j==4){zero();select();}}voidsee1(){inti,m1;FILE*fp1,*fi1;if((fi1=fopen("c1","r"))==NULL){printf("\t無存儲(chǔ)信息\n");see();}fi1=fopen("c1","rb");fread(&m1,sizeof(int),1,fi1);if(m1==0){printf("\t無存儲(chǔ)信息\n");see();}for(i=0;i<m1;i++){fp1=fopen("word_list","rb");fseek(fp1,i*sizeof(structword_list),0);fread(&word[i],sizeof(structword_list),1,fp1);printf("英語:%s\n\n中文:%s\n",&word[i].a1,&word[i].b1);}fclose(fp1);fclose(fi1);see();}voidsee2(){inti,m2;FILE*fp2,*fi2;if((fi2=fopen("c2","r"))==NULL){printf("\t無存儲(chǔ)信息\n");see();}fi2=fopen("c2","rb");fread(&m2,sizeof(int),1,fi2);if(m2==0){printf("\t無存儲(chǔ)信息\n");see();}for(i=0;i<m2;i++){fp2=fopen("phrase_list","rb");fseek(fp2,i*sizeof(structphrase_list),0);fread(&phrase[i],sizeof(structphrase_list),1,fp2);printf("英語:%s\n中文:%s\n",&phrase[i].a2,&phrase[i].b2);}fclose(fp2);fclose(fi2);see();}voidsee3(){inti,m3;FILE*fp3,*fi3;if((fi3=fopen("c3","r"))==NULL){printf("\t無存儲(chǔ)信息\n");see();}fi3=fopen("c3","rb");fread(&m3,sizeof(int),1,fi3);if(m3==0){printf("\t無存儲(chǔ)信息-\n");see();}for(i=0;i<m3;i++){fp3=fopen("sentence_list","rb");fseek(fp3,i*sizeof(structsentence_list),0);fread(&sentence[i],sizeof(structsentence_list),1,fp3);printf("英語:%s\n中文:%s\n",&sentence[i].a3,&sentence[i].b3);}fclose(fp3);fclose(fi3);see();}voidone(){intm1,n,k,i,j=0,t;chara[10];getchar();FILE*fi1,*fp1;if((fi1=fopen("c1","r"))==NULL){printf("\t無學(xué)習(xí)信息\n");zero();select();}fi1=fopen("c1","rb");fread(&m1,sizeof(int),1,fi1);n=m1;fclose(fi1);if(n<10){printf("\n\t學(xué)習(xí)單詞不夠,請(qǐng)錄入單詞確確\n");}\n");zero();select();}else{單詞練習(xí)printf("\t—————————單詞練習(xí)\n");srand((unsigned)time(NULL));for(i=0;i<5;i++){k=rand()%n+1;fp1=fopen("word_list","rb");fseek(fp1,(k-1)*sizeof(structword_list),0);fread(&word[k-1],sizeof(structword_list),1,fp1);printf("\n%s翻譯為中文:",&word[kT].a1);gets(a);if((strcmp(a,word[k-1].b1))==0){printf("\n回答正確\n");j++;}else{printf("\n回答錯(cuò)誤,加油,再試試吧\n");printf("\n%s翻譯為中文:",&word[kT].a1);gets(a);if((strcmp(a,word[k-1].b1))==0){回答正printf("\n回答正else{printf("\n回答錯(cuò)誤,記住下面的正確答案哦!\n");printf("正確答案:%s\n",&word[kT].b1);}}}for(i=5;i<10;i++){k=rand()%n+1;fp1=fopen("word_list","rb");fseek(fp1,(k-1)*sizeof(structword_list),0);fread(&word[k-1],sizeof(structword_list),1,fp1);printf("%s翻譯為英文:",&word[kT].b1);gets(a);if((strcmp(a,word[k-1].a1))==0){printf("\n回答正確\n");j++;}else{printf("\n回答錯(cuò)誤,加油,再試試吧!\n");printf("\n%s翻譯為英文:",&word[kT].b1);gets(a);getchar();if((strcmp(a,word[k-1].a1))==0){printf("\n回答正確\n");}else

printf("\n回答錯(cuò)誤,記住下面的正確答案printf("\n回答錯(cuò)誤,記住下面的正確答案哦!\n");printf("正確答案:%s\n",&word[kT].a1);}}fclose(fp1);printf("\n答對(duì)%d題,得分%d\n",j,j*10);if(j>=(i*0.9)){{printf("\t\t\n")printf("\t\t|~~~~~~~,?????????????????/X“?????????????????????11(\~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t||\n")printf("\t\t|恭喜你可以進(jìn)入下一級(jí)|\n");printf("\t\t||\n")printf("\t\t|1.進(jìn)入下一級(jí)|\n")printf("\t\t||\n")printf("\t\t|2.繼續(xù)單詞翻譯|\n")printf("\t\t||\n")printf("\t\t|3.退出|\n")printf("\t\t||\n")printf("\t\t||\n")printf("\t\t|~~~~~~~,?????????????????/X“?????????????????????11(\~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t請(qǐng)選擇:");scanf("%d",&t);if(t==1)two();if(t==2)one();if(t==3){zero();select();}}

else{printf("\t\tprintf("\t\t|~~~~~~printf("\t\t|printf("\t\t|else{printf("\t\tprintf("\t\t|~~~~~~printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|~~~~~~printf("\t\tscanf("%d",&t);if(t==1)one();if(t==2){zero();select();}}}繼續(xù)努力1.繼續(xù)2.退出\n");“?????????????I1(\~~~~~~~~~~~~~|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");“?????????????I1(\~~~~~~~~~~~~~|\n");請(qǐng)選擇:");voidtwo(){intm2,n,k,i,j=0,t;chara[20];getchar();FILE*fi2,*fp2;if((fi2=fopen("c2","r"))==NULL){printf("\n無學(xué)習(xí)信息\n");zero();select();fi2=fopen("c2","rb");fread(&m2,sizeof(int),1,fi2);n=m2;fclose(fi2);if(n<10){printf("\t短語不夠,請(qǐng)錄入短語\n");zero();select();}else{printf("\t短語練習(xí)—————————\n");srand((unsigned)time(NULL));for(i=0;i<5;i++){k=rand()%n+1;fp2=fopen("phrase_list","rb");fseek(fp2,(k-1)*sizeof(structphrase_list),0);fread(&phrase[k-1],sizeof(structphrase_list),1,fp2);printf("%s翻譯為中文:",&phrase[kT].a2);scanf("%s",a);if((strcmp(a,phrase[k-1].b2))==0){printf("\n回答正確\n");j++;}else{printf("\n回答錯(cuò)誤,加油,再試試吧\n");gets(a);if((strcmp(a,phrase[k-1].b2))==0){回答正printf("\n回答正else{printf("\n回答錯(cuò)誤,記住下面的正確答案哦!\n");printf("%s翻譯為中文:",&phrase[kT].a2);printf("正確答案:%s\n",&phrase[kT].b2);}}}}for(i=5;i<10;i++){k=rand()%n+1;fp2=fopen("phrase_list","rb");fseek(fp2,(k-1)*sizeof(structphrase_list),0);fread(&phrase[k-1],sizeof(structphrase_list),1,fp2);printf("%s翻譯為英文:",&phrase[kT].b2);gets(a);if((strcmp(a,phrase[k-1].a2))==0){printf("\n回答正確\n");j++;}else{gets(a);if((strcmp(a,phrase[k-1].a2))==0)回答正printf("\n

回答正else{printf("\n回答錯(cuò)誤,記住下面的正確答案哦!\n");printf("%s翻譯為英文:",&phrase[kT].b2);printf("正確答案:%s\n",&phrase[kT].a2);}}}printf("\t\t|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");fclose(fp2);printf("\n---if(j>=(i*0.9)){printf("\t\tprintf("\t\t|printf("\t\tprintf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|答對(duì)%d題,得分%d\n",j,j*10)fclose(fp2);printf("\n---if(j>=(i*0.9)){printf("\t\tprintf("\t\t|printf("\t\tprintf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|答對(duì)%d題,得分%d\n",j,j*10)???????????????????????????????????????????????????????????????太棒了?????????????????恭喜你可以進(jìn)入下一級(jí)1.進(jìn)入下一級(jí)繼續(xù)短語翻譯退出\n");|\n");\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");printf("\t\t請(qǐng)選擇:");scanf("%d",&t);if(t==1)three();if(t==2)two();

if(t==3){zero();select();}zero();select();}}elseif(j<(i*0.9)&&j>=(i*0.6)){printf("\t\tprintf("\t\t|~~~~~~~~~~~~~~~~~printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|printf("\t\t|1.繼續(xù)printf("\t\t|printf("\t\t|2.退出printf("\t\t|printf("\t\t|printf("\t\t|~~~~~~~~~~~~~~~~~printf("\t\t\n");,???????????????????????????I1(\~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");|\n");繼續(xù)努力|\n");|\n");|\n");|\n");|\n");|\n");|\n");|\n");,???????????????????????????I1(\~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");請(qǐng)選擇:");scanf("%d",&t);if(t==1)two();if(t==2){zero();select();}}else{scanf("%d",&t);if(t==1)two();if(t==2){zero();select();}}else{printf("\t\t\n");printf("\t\t|??????????????????????????????????????????????I1(\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n")printf("\t\t||\n");printf("\t\t|printf("\t\t|再做一下單詞練習(xí)吧|\n");|\n");printf("\tprintf("\t句子不夠,請(qǐng)錄入短語printf("\t\t||\n");printf("\t\t|1.好的|\n");printf("\t\t||\n");printf("\t\t|2.退出|\n");printf("\t\t||\n");printf("\t\t||\n");printf("\t\t|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|\n");請(qǐng)選擇:");printf("\t\tscanf("%d",&t);請(qǐng)選擇:");if(t==1)one();if(t==2){zero();select();}}}voidthree(){intm3,n,k,i,j=0,t;chara[100];getchar();FILE*fi3,*fp3;if((fi3=fopen("c3","r"))==NULL){printf("無學(xué)習(xí)信息\n");zero();select();}fi3=fopen("c3","rb");fread(&m3,sizeof(int),1,fi3);n=m3;fclose(fi3);if(n<10){\n");zero();select();}else{printf("\t句子練習(xí)————");srand((unsigned)time(NULL));for(i=0;i<5;i++){k=rand()%n+1;fp3=fopen("sentence_list","rb");fseek(fp3,(k-1)*sizeof(structsentence_list),0);fread(&sentence[k-1],sizeof(structsentence_list),1,fp3);printf("%s翻譯為中文:",&sentence[kT].a3);scanf("%s",a);if((strcmp(a,sentence[k-1].b3))==0){printf("\n回答正確\n");j++;}else{printf("\n回答錯(cuò)誤,加油,再試試吧\n");gets(a);if((strcmp(a,sentence[k-1].b3))==0){printf("\n回答正確\n");}else{printf("\n回答錯(cuò)誤,記住下面的正確答案printf("\n回答錯(cuò)誤,記住下面的正確答案哦!printf("%s翻譯為中文:",&sentence[kT].a3);printf("正確答案:%s\n",&sentence[kT].b3);}}}}for(i=5;i<10;i++){k=rand()%n+1;fp3=fopen("sentence_list","rb");fseek(fp3,(k-1)*sizeof(structsentence_list),0);fread(&sentence[k-1],sizeof(structsentence_list),1,fp3);printf("%s翻譯為英文:",&sentence[kT].b3);scanf("%s",a);if((strcmp(a,sentence[k-1].a3))==0){printf("\n回答正確\n");j++;}else{printf("\n回答錯(cuò)誤,加油,再試試吧\n");scanf("%s",a);if((strcmp(a,sentence[k-1].a3))==0){printf("\n回答正確\n");}else

printf("\n回答錯(cuò)誤,記住下面的正確答案printf("\n回答錯(cuò)誤,記住下面的正確答案哦!\n");printf("%s翻譯為英文:",&sentence[kT].b3);printf("正確答案:%s\n",&sentence[kT].a3);}}}fclose(fp3);printf("答對(duì)%d題,得分%d\n",j,j*10);if(j>=(i*0.9)){\n");printf("\t\t\n");printf("\t\t|??????????????????????????????????????????????I1(\pr

溫馨提示

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

評(píng)論

0/150

提交評(píng)論