① c語言程序設計(1) 小學生計算機輔助教學系統
right_prompt()
{
intx;
x=rand()%4+1;
switch(x){
內case1:
printf("VeryGood!容 ");
break;
case2:
printf("Excellent! ");
break;
case3:
printf("Nicework! ");
break;
case4:
printf("Keepupthegoodwork! ");
break
}
}
wrong_prompt()
{
intx;
x=rand()%4+1;
switch(x){
case1:
printf("No.Pleasetryagain. ");
break;
case2:
printf("Wrong.Tryoncemore. ");
break;
case3:
printf("Don』tgiveup! ");
break;
case4:
printf("Notcorrect.Keeptrying. ");
break;
}
}
② 題目:計算機輔助教學(CAI)軟體開發:教小學生學算術。
求大神!!!!!!!!!!!!!!!!!!!!
③ C程序課程設計題目:小學生計算機輔助教學系統。 詳情如下,望各位高手幫忙給出源代碼!
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main()
{
int a,b,op,term;
int x,i=0;
int counter = 0; /*初始答對題數為*/
char opchar;
srand(time(NULL)); /*為函數rand()設置隨機數種子*/
a= rand()%10+1;
b= rand()%10+1;
for(i= 0;i < 10;i++)
{
a= rand()%10+1;
b= rand()%10+1;
op=rand()%4+1;
switch(op) /*根據運算符號不同進行不同的運算*/
{
case1:opchar='+';
term=a+ b;
break;
case2: opchar='-';
term=a - b;
break;
case3: opchar='*';
term=a*
b;
break;
case
4:
opchar='/';
term=a/b;
break;
default:
printf("Wrong
operator!");
}
printf("%d%c%d=",a,opchar,b);
scanf("%d",&x);
if(x==term)
{
printf("Right!\n");
counter++;
}
else
printf("Wrong!\n");
}
printf("Total
score is %d\n",counter*10);
printf("Rate
of correctness is %d%%\n",counter*10);
}
④ c語言編程作業小學生計算機輔助教學系統
#include<stdio.h>
#include<stdlib.h>
#ifndefRedContritio
#include<string.h>
#else
#message("ThisisRedContritio'senergy")
#endif
#include<time.h>//用到了time函數
intjia(inta,intb){
returna+b;
}
charsolutation[999]="