C语言课程设计报告书教小学生学英语.docx
《C语言课程设计报告书教小学生学英语.docx》由会员分享,可在线阅读,更多相关《C语言课程设计报告书教小学生学英语.docx(31页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、C语言程序设计课程设计报告设计题目:教小学生学英语专业微电子学号3130434063班级132班姓名布玛利亚.吾斯曼指导教师张老师2013年秋季学期 I .ln )pr intf (tt|n);printf (tt|记录成功!是否继续记录单词1n);printf (tt|n);pr intf (tt|n);pr intf (tt|1.继续 |n);printf (tt|n);pr intf (tt|2.退出 |n);printf (tt|n);printf|n);printf(tt|请输入:”);scanf (%d,&j);if (j=1);else if(j=2) break;)zero (
2、);se I ect (); vo i d save3 ()i nt i, j, m3;FILE *fp3, *fi3;if (fp3=fopen(nsentence_I ist,r)二二NULL) fp3=fopen(sentence_l i st, wb);fcIose (fp3);) if (f i3二fopen (”c3,“r)=NULL)m3=0;fi3=fopen(nc3H, nwbn);fwr i te (&m3, s i zeof (i nt), 1, f i 3);fc I ose (f i 3) ;if (fi3=fopen(Hc3n, nrbn)!=NULL) f i3=
3、fopen(l,c3H, Hrb);f read (&m3, s i zeof (i nt), 1, f i 3);1 二 m3;已存满,不能存入数据for (i;i= (SIZE-1) printf (n”);break; e I se pr i ntf (”请输入英文短句:”);getchar ();gets (sentence i.a3);pr intf (n请输入中文短句:);gets (sentence i.b3);i f (fp3=fopen (Hsentence_I ist, “ab”)二二NULL)pr i ntf (cannot open fi len); exit (0);
4、)i f (fwr i te (&sentence i, s i zeof (struct sentence_I i st), 1, fp3)!=1)printf (fi Ie wr i te errorn);fcIose (fp3);m3=m3+1;if (f i3=fopen (”c3“,“wb)=NULL)pr i ntf (cannot open fi len); exit (0);)i f (fwr i te (&m3, s i zeof (i nt), 1, f i 3) !=1) pr intf (fi Ie write errorn);fc I ose (f i 3); pr
5、intf (tt pr i ntf (tt pr i ntf (tt| printf (tt| pr intf (tt|记录成功!是否继续记录单词n ln ln -|n) ) ) ) )pr i ntf (tt pr i ntf (tt pr intf (tt pr i ntf (tt pr intf (tt pr i ntf (tt1 .继续-一2 .退出n);n);n);n);n);nn);n“);请输入:”);pr intf (tt scanf (%d, &j);if(j=1);else if (j=2)break;zero ();se I ect (); vo i d see 0 in
6、t j ;printf(ttn);printf(ttn);printf ( tt|n );printf (tt|n);pr i ntf (tt |请选择,己,忆类型1 n);pr intf (tt|n);printf|n);pr intf (tt |1.记忆单词|n);printf (tt|n);pr intf (tt |2.记忆短语|n);printf|n);pr intf (tt |3.记忆句子| n);printf (tt|n);pr intf |4.退出| n);printf(Htt|nH); / II I ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ I .
7、pr mtf ( tt |n );pr intf (tt请输入:);scanf (%dn,&j);if (j=1) seel 0 ;e I se if(j=2) see2 0 ;e I se i f (j=3) see3 ();e I se i f (j-4) zero () ; se I ect () ;) vo i d seel ()i nt i, ml;FILE *fp1,*fi1;if (f i 1 =fopen(“c1 ”r) =NULL)printf(t无存储信息n) ;see() ;f i1=fopenCd-rb);fread(&m1, s i zeof (i nt),1,f i
8、1);if (m1-0)printf (t无存储信息n) ;see() ;for (i=0; im1;i+)fp1=fopen (word_l i st, rb);fseek (fp1, i *s i zeof (struct word_l i st),0);fread (&wordi, s i zeof (struct word_l i st), 1, fp1);pr i ntf (英语:%snn 中文:%sn, &word i . a1, &word i . b1); 1f f f f f|I)fcIose (fp1);fcIose (fi1);see (); vo i d see2 ()
9、 i nt i, m2;FILE *fp2, *fi2;if (fi2二fopen (”c2,“r)二二NULL)pr intf (t无存储信息n) ;see() ;f i2=fopen(,c2H, b);fread(&m2, s i zeof (i nt),1,f i 2);if (m2=0)printf (t无存储信息n);see 0 ;for (i=0;im2;i+)fp2=fopen (phrase_l i st, nrb);fseek (fp2, i *s i zeof (struct phrase_l i st), 0);fread (&phrase i,s i zeof (str
10、uct phrase_l i st), 1, fp2);pr i ntf (英语:%sn 中文:%snH, &phrase i . a2, &phrase i . b2); f VI V f、|I) fcIose (fp2); fc I ose (f i 2); see ();) vo i d see3 ()i nt i, m3;FILE *fp3, *fi3;if (fi3=fopen (”c3,“r)二二NULL)printf(t无存储信息n) ;see 0 ;fi3=fopen(nc3H, nrbn);f read (&m3, s i zeof (i nt), 1, f i 3);if
11、(m3=0)printf(nt无存储信息一n);see0 ;for (i=0;im3;i+)fp3=fopen(sentence_l i st, rb);fseek (fp3, i *s i zeof (struct sentence_l i st), 0);fread (&sentence i,s i zeof (struct sentence_I i st), 1, fp3);pr i ntf (英语:%sn 中文:%snH, &sentence i . a3, &sentence i . b3);pr i ntT k不不不不不不不林不不不不不不不不不林不不不不不不不不不不不不不不不不不不
12、不不不不不不不不不不不不不不不不不不n ;; fcIose (fp3); fc I ose (f i 3); see ();) vo i d one 0i nt ml, n, k, i, j=0, t;char a 10jgetchar 0 ;FILE *fi1,*fp1;if (f i1=fopen (c1r) =NULL)pr i ntf (t无学习信息n) ;zero() ; select () ;f i1=fopen(”c1“,”rb“);fread (&m1, s i zeof (i nt),1,f i1);n=m1;fcIose (f i1);if (n10)printf(nt学习
13、单词不够,请录入单词nn) ; zero () ; se I ect () ;)e I sepr i ntf (t单词练习n);srand(uns i gned)t ime (NULL);for (i=0; i5; i+)k=rand 0%n+1;fp1=fopen (uword_l i st1, rb);fseek(fp1, (k-1)*sizeof (struct word_l i st), 0);fread (&word k-1,s i zeof (struct word_l i st), 1,fp1);pr intf (n%s翻译为中文:,&wo为中T.a1);gets (a);i f
14、 (strcmp (a, word k-1 . b1) =0)pr intf (n回答正确! !n);j+; e I se printf(n回答错误,加油,再试试吧n);pr i ntf (n%s 翻译为中文:n, &word k-1 . a1); gets (a);i f (strcmp (a, wordk-1. b1)二二0) (printf (n回答正确! !n);eI se pr intf (n回答错误,记住下面的正确答案哦!n);pr i ntf (正确答案:%snu, &word k-1 . b1) ; for (i=5;i=(i*0. 9) (printf(ttn);printf
15、 ( tt|n );printf(tt|n);printf(tt|!恭喜你可以进入下一级! !|n);printf|n);pr intf (tt |1 .进入下一级|n);printf (tt|n);pr intf |2.继续单词翻译|n);printf |n);printf (tt |3.退出| n);printf (tt|n);printf|n);printf(tt|n);printf (tt请选择:);scanf (%d, &t);if (t=1)two ();if (t2)one ();if (t=3)zero () ; se I ect () ; e I seprintfn);pri
16、 ntf (W |.printf (tt|n);printf(tt|继续努力|n);printf|n);printf (tt|n);printf(tt|1.继续|n);printf (tt|n);pr intf |2.退出|n);pr intf (tt|n);pr intf (tt|n);printf ( tt|n );pr intf (tt请选择:);scanf (%d, &t);if (t-1)one ();if (t=2)zero () ; se I ect () ;1vo i d two () int m2, n, k, i, j=0, t;char a 20;getchar 0 ;F
17、ILE *fi2, *fp2;i f (f i 2=fopen ( c2 “, r )二二NULL) (pr intf (n无学习信息n) ; zero () ; se I ect (); )f i2=fopen(,c2n, nrbn);fread(&m2, s i zeof (i nt),1,f i 2);n=m2;fcIose (f i 2);if (n10) pr intf (t短语不够,请录入短语n) ; zero () ; se I ect ();e I se ( pr i ntf (t短语练习设计任务:题目:计算机辅助教学(CAI)软件开发:教小学生学英语功能:1.屏幕上随机出现一
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言 课程设计 报告书 小学生 英语
限制150内