日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

个性化背词软件 更新ing(9-4)

發(fā)布時(shí)間:2025/3/21 编程问答 15 豆豆
生活随笔 收集整理的這篇文章主要介紹了 个性化背词软件 更新ing(9-4) 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 5 #define NUM 1000 6 7 struct VOC 8 { 9 char word[10];//單詞 10 char translation[60];// 翻譯 11 int whichDay;//哪一天背的 12 int correctNum;//正確次數(shù) 13 int wrongNum;//錯(cuò)誤次數(shù) 14 int passed;//是否通過(guò) 15 }voc[NUM]; 16 17 int score[100];//成績(jī) 18 int time=0;//背誦天數(shù) 19 20 FILE *vocRead(); 21 FILE *fileRead(int *,int *); 22 void check(int time); 23 void start(); 24 int amounts=100;//測(cè)試使用 25 26 int main() 27 { 28 start(); 29 time=1; 30 voc[159].whichDay=1;voc[658].whichDay=1;voc[237].whichDay=1;//進(jìn)行測(cè)試 31 check(time); 32 return 0; 33 } 34 35 FILE *vocRead() 36 { 37 FILE *fp; 38 fp=fopen("百次斬詞庫(kù).txt","r"); 39 if(fp==0) 40 { 41 printf("文件出錯(cuò),請(qǐng)檢查。"); 42 exit(1); 43 } 44 fscanf(fp,"%s%s",&voc[0].word,&voc[0].translation); 45 for(int i=1;!feof(fp)&&i<NUM;i++) 46 { 47 fscanf(fp,"%s%s",&voc[i].word,&voc[i].translation); 48 } 49 fclose(fp); 50 } 51 //void recite(int time); 52 void check(int time) 53 { 54 int k=0;//檢查次數(shù) 55 float todayScore[200]; 56 char input[10]; 57 time=1; 58 for(int i=0;i<NUM;i++) 59 { 60 if(voc[i].whichDay==time) 61 { 62 printf("請(qǐng)輸入相應(yīng)的單詞:%s\n",voc[i].translation); 63 while(1) 64 { 65 if(k==7) 66 { 67 printf("\n%s",voc[i].word); 68 break; 69 } 70 scanf("%s",input); 71 if(strcmp(voc[i].word,input)==0) 72 { 73 voc[i].correctNum++; 74 if(voc[i].correctNum>=voc[i].wrongNum) 75 { 76 voc[i].passed=1; 77 todayScore[time]++; 78 break; 79 } 80 printf("輸入正確,你真棒!請(qǐng)?jiān)俅屋斎?#xff1a;"); 81 } 82 else 83 { 84 printf("輸入錯(cuò)誤,請(qǐng)重新輸入:"); 85 voc[i].wrongNum++; 86 } 87 k++; 88 } 89 } 90 } 91 todayScore[time]=todayScore[time]/amounts; 92 } 93 94 void displayFail(int time) 95 { 96 printf("單詞\t翻譯\n"); 97 for(int i=0;i<NUM;i++) 98 { 99 if(voc[i].whichDay==time) 100 { 101 if(voc[i].passed==0) 102 { 103 printf("%s\t%s\n",voc[i].word,voc[i].translation); 104 } 105 } 106 } 107 } 108 109 void start() 110 { 111 printf("**********1.開(kāi)始背詞**********\n"); 112 printf("********2.設(shè)置背誦數(shù)量**********\n"); 113 printf("**********3.檢查今天單詞**********\n"); 114 printf("**********1.開(kāi)始背詞**********\n"); 115 printf("**********1.開(kāi)始背詞**********\n"); 116 printf("**********1.開(kāi)始背詞**********\n"); 117 printf("**********1.開(kāi)始背詞**********\n"); 118 printf("**********1.開(kāi)始背詞**********\n"); 119 char choice=getchar(); 120 switch(choice) 121 { 122 case '1':; 123 // case '2':settings();break; 124 case '3':check(time); 125 } 126 } 127 128 FILE *fileRead(int *amounts,int *passedScore) 129 { 130 char nothing[30]; 131 FILE *fp; 132 fp=fopen("詞庫(kù)數(shù)據(jù)管理","r+"); 133 if(fp==0) 134 { 135 printf("文件出錯(cuò),請(qǐng)檢查。"); 136 exit(1); 137 } 138 fscanf(fp,"%s%d%s%d%s",nothing,amounts,nothing,passedScore,nothing); 139 fscanf(fp,"%d%d%d%d",&voc[0].whichDay,&voc[0].correctNum,&voc[0].wrongNum,&voc[0].passed); 140 for(int i=1;!feof(fp)&&i<NUM;i++) 141 { 142 fscanf(fp,"%d%d%d%d",&voc[i].whichDay,&voc[i].correctNum,&voc[i].wrongNum,&voc[i].passed); 143 } 144 fclose(fp); 145 return fp; 146 }

?

轉(zhuǎn)載于:https://www.cnblogs.com/ncoheart/p/9582467.html

總結(jié)

以上是生活随笔為你收集整理的个性化背词软件 更新ing(9-4)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。