用C语言编一个小学算术运算测试程序

功能要求:制作一个可供小学数学运算程序:10以内加减法,能根据输入题数出题,判断做题是否正确,最后计算分数。界面要求:美观简洁每一步后写明注释例如:输入5,即表明出五道题... 功能要求:制作一个可供小学数学运算程序:10以内加减法,能根据输入题数出题,判断做题是否正确,最后计算分数。
界面要求:美观简洁
每一步后写明注释
例如:输入5,即表明出五道题。
如果能讲清楚每一步的意思,我会再追加分数的.
展开
 我来答
元宝趣学
2008-09-02 · TA获得超过1102个赞
知道小有建树答主
回答量:734
采纳率:100%
帮助的人:590万
展开全部
能根据输入题数出题 什么意思
有个题库?
界面要求:美观简洁 什么标准
作者满意就可?

实现起来应该不难
晚上9点以后我可以帮你做

好办 我帮你写吧 能否多给点分呢 (*^__^*) 嘻嘻……
晚上10点前给你答案

花了一个中午给你编的,还增加了计算分数功能
界面没有做 需要的话再联系
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int Getanum(int num)
{
int a;
srand(num*num+time(0));
a=(rand()+num)%10;//产生10以内的随机数
return a;
}

void main()
{
int i,num,a,b,c,op,error;
error = 0;//错误数置零
num = 100;//使得下面的while循环成立即可
while(!(num>0&&num<10))//只接受10以内的题目数
{
printf("Please input the sum of exam :");
scanf("%d",&num);
}
for(i=0;i<num;i++)//每次出题开始
{
a = Getanum(i);//第一个操作数
b = Getanum(a);//第二个
op = (Getanum(a+b)+b)/a%2;//产生符号 +或者-
switch(op)
{
case 0://+
if(a+b>10)//超过10重新来
{
i--;
break;
}
else
{
printf("%d : %d + %d = ",i+1,a,b);//出题
scanf("%d",&c);//取输入的结果
if(c != a+b)//答案错误
{
printf("Error!\n");
error++;
}
else//正确答案鼓励一下
{
printf("Good!\n");
}
}
break;

case 1://-
if(b>a)//保证a>b 使得不出现负数
{
a=a+b;
b=a-b;
a=a-b;
}
printf("%d : %d - %d = ",i+1,a,b);//出题
scanf("%d",&c);//取结果
if(c != a-b)
{
printf("Error!\n");
error++;//错误自加
}
else
{
printf("Good!\n");
}
break;

default:
break;
}
}
printf("%d errors!\n",error);//输出错误数
printf("Your mark is %d .\n",(num-error)*100/num);//所得分数
}
岑辰阳蔺芮
2019-12-17 · TA获得超过2.9万个赞
知道大有可为答主
回答量:1.1万
采纳率:33%
帮助的人:719万
展开全部
能根据输入题数出题
什么意思
有个题库?
界面要求:美观简洁
什么标准
作者满意就可?
实现起来应该不难
晚上9点以后我可以帮你做
好办
我帮你写吧
能否多给点分呢
(*^__^*)
嘻嘻……
晚上10点前给你答案
花了一个中午给你编的,还增加了计算分数功能
界面没有做
需要的话再联系
#include
<stdio.h>
#include
<stdlib.h>
#include
<time.h>
int
Getanum(int
num)
{
int
a;
srand(num*num+time(0));
a=(rand()+num)%10;//产生10以内的
随机数
return
a;
}
void
main()
{
int
i,num,a,b,c,op,error;
error
=
0;//错误数置零
num
=
100;//使得下面的while循环成立即可
while(!(num>0&&num<10))//只接受10以内的题目数
{
printf("Please
input
the
sum
of
exam
:");
scanf("%d",&num);
}
for(i=0;i<num;i++)//每次出题开始
{
a
=
Getanum(i);//第一个操作数
b
=
Getanum(a);//第二个
op
=
(Getanum(a+b)+b)/a%2;//产生符号
+或者-
switch(op)
{
case
0://+
if(a+b>10)//超过10重新来
{
i--;
break;
}
else
{
printf("%d
:
%d
+
%d
=
",i+1,a,b);//出题
scanf("%d",&c);//取输入的结果
if(c
!=
a+b)//答案错误
{
printf("Error!\n");
error++;
}
else//正确答案鼓励一下
{
printf("Good!\n");
}
}
break;
case
1://-
if(b>a)//保证a>b
使得不出现负数
{
a=a+b;
b=a-b;
a=a-b;
}
printf("%d
:
%d
-
%d
=
",i+1,a,b);//出题
scanf("%d",&c);//取结果
if(c
!=
a-b)
{
printf("Error!\n");
error++;//错误自加
}
else
{
printf("Good!\n");
}
break;
default:
break;
}
}
printf("%d
errors!\n",error);//输出错误数
printf("Your
mark
is
%d
.\n",(num-error)*100/num);//所得分数
}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
普翼烟清昶
2019-04-27 · TA获得超过3874个赞
知道大有可为答主
回答量:3130
采纳率:28%
帮助的人:224万
展开全部
能根据输入题数出题
什么意思
有个题库?
界面要求:美观简洁
什么标准
作者满意就可?
实现起来应该不难
晚上9点以后我可以帮你做
好办
我帮你写吧
能否多给点分呢
(*^__^*)
嘻嘻……
晚上10点前给你答案
花了一个中午给你编的,还增加了计算分数功能
界面没有做
需要的话再联系
#include
<stdio.h>
#include
<stdlib.h>
#include
<time.h>
int
Getanum(int
num)
{
int
a;
srand(num*num+time(0));
a=(rand()+num)%10;//产生10以内的随机数
return
a;
}
void
main()
{
int
i,num,a,b,c,op,error;
error
=
0;//错误数置零
num
=
100;//使得下面的while循环成立即可
while(!(num>0&&num<10))//只接受10以内的题目数
{
printf("Please
input
the
sum
of
exam
:");
scanf("%d",&num);
}
for(i=0;i<num;i++)//每次出题开始
{
a
=
Getanum(i);//第一个操作数
b
=
Getanum(a);//第二个
op
=
(Getanum(a+b)+b)/a%2;//产生符号
+或者-
switch(op)
{
case
0://+
if(a+b>10)//超过10重新来
{
i--;
break;
}
else
{
printf("%d
:
%d
+
%d
=
",i+1,a,b);//出题
scanf("%d",&c);//取输入的结果
if(c
!=
a+b)//答案错误
{
printf("Error!\n");
error++;
}
else//正确答案鼓励一下
{
printf("Good!\n");
}
}
break;
case
1://-
if(b>a)//保证a>b
使得不出现负数
{
a=a+b;
b=a-b;
a=a-b;
}
printf("%d
:
%d
-
%d
=
",i+1,a,b);//出题
scanf("%d",&c);//取结果
if(c
!=
a-b)
{
printf("Error!\n");
error++;//错误自加
}
else
{
printf("Good!\n");
}
break;
default:
break;
}
}
printf("%d
errors!\n",error);//输出错误数
printf("Your
mark
is
%d
.\n",(num-error)*100/num);//所得分数
}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
吾赋恋暴能02
2008-09-02 · TA获得超过1388个赞
知道小有建树答主
回答量:431
采纳率:50%
帮助的人:272万
展开全部
还界面美观简洁!你说的可真好听!
一分不给,还这么多要求!
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
pujia12345
2008-09-02 · TA获得超过3680个赞
知道大有可为答主
回答量:3456
采纳率:0%
帮助的人:2935万
展开全部
要delphi不 我给你快速开发
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(4)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式