小學生數學計算機輔助教學系統

2021-10-03 00:10:49 字數 3189 閱讀 3944

//小學生數學計算機輔助教學系統:computer teaching system of mathematics for primary school students//

//標頭檔案

#include

#include

//提供srand() rand()

#include

//提供time(null)

//函式宣告

intquestiontypes()

;//問題型別 提供加法 減法 乘法 除法 四則運算 退出選項

intquestionmodels()

;//問題模式 類似於闖關模式 提供直到正確為止 三次機會 十道題 正確率高於百分之75

char

createoperator

(int);

//根據問題型別建立運算子

char

createrandomoperator()

;//提供四則運算模式下建立運算子

double

calculate

(int

,char

,int);

//計算運算結果

void

printrandomrightevaluation()

;//輸出正確答案評價

void

printrandomwrongevaluation()

;//輸出錯誤答案評價

void

model_1

(int);

//闖關一

void

model_2

(int);

//闖關二

void

model_3

(int);

//闖關三

void

model_4

(int);

//闖關四

//主函式

intmain()

}else

return0;

}int

questiontypes()

intquestionmodels()

char

createoperator

(int m)

return ch;

}char

createrandomoperator()

return c;

}double

calculate

(int a,

char c,

int b)

//考慮到除法運算 所以結果設定成double型別

return z;

}void

printrandomrightevaluation()

}void

printrandomwrongevaluation()

}void

model_1

(int m)

else

}while

(flag==0)

;//剛開始我使用的條件是useranwser!=c 發現非第一次輸入正確答案時沒有輸出right! 所以設立了flag標誌變數

}void

model_2

(int m)

else

else}}

while

(count<=3)

;//給3次重做機會 不是只有3次答題機會 這裡要注意文字遊戲

}void

model_3

(int m)

else

} sum=count*10;

printf

("此次練習總分為%d 正確率為%d%%\n"

,sum,sum)

;//這裡需要注意%的輸出是%%

}void

model_4

(int m)

else

} sum=count*10;

printf

("此次練習總分為%d 正確率為%d%%\n"

,sum,sum)

;//這裡需要注意%的輸出是%%

}while

(sum<=75)

;}測試結果:

歡迎來到小學生數學計算機輔助教學系統!

1.加法練習

2.減法練習

3.乘法練習

4.除法練習

5.四則運算練習

0.退出系統

請輸入操作編號:

51.闖關一,每道題做到正確為止

2.闖關二,每道題有三次答題機會

3.闖關三,每套題有十道題且每道題只有一次答題機會

4.闖關四,每套題做到正確率大於百分之七十五為止

請輸入操作編號:465

+69=1

not correct. keep trying.17/

78=1not correct. keep trying.97/

75=1excellent!94-

35=1no. please try again!23+

95=1not correct. keep trying.71/

92=1don』t give up!52*

56=1don』t give up!52*

56=1wrong. try once more.49-

16=1wrong. try once more.49-

16=1no. please try again!

此次練習總分為10 正確率為10%29

+12=41

excellent!61-

50=11very good!58+

10=68nice work!35*

35=1not correct. keep trying.92/

87=1excellent!89-

48=41very good!98+

10=108nice work!24*

30=720nice work!64*

62=1not correct. keep trying.22/

83=0excellent!

此次練習總分為80 正確率為80

%process returned 0

(0x0

) execution time :

83.384 s

press any key to continue

.

C語言實現小學生計算機輔助教學系統

開發乙個小學生計算機輔助教學系統。使用隨機書產生函式產生1 10之間的隨機數作為運算元,隨機產生一道四則運算題,配合使用switch語句和print 函式呼叫,來為學生輸入的正確或者錯誤的答案輸出不同的評價。若10道題做完之後正確率低於75 則重新做10道題,直到回答正確率高於75 時才退出程式。要...

小學生數學題

psp2.1 personal software process stages 預估耗時 分鐘 實際耗時 分鐘 planning 計畫20 35 estimate 估計這個任務需要多少時間22 development 開發120 240 analysis 需求分析 包括學習新技術 6090 desi...

GDKOI2016 小學生數學題

給定n,k,p 求 ni 1 1i modpk 若答案不存在則輸出 1n pk 10 18 p 105 p 為質數這道題的確是道不錯的數學題。設f n,k ni 1 1i modpk 那麼我們將1,2,n 分為兩類 1.p 的倍數,設為集合 s2.其他,設為集合t 那麼很顯然,集合 t中的數都與pk...