标题:[求助]哪路高手来帮帮!
只看楼主
yan704
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2005-5-19
 问题点数:0 回复次数:17 
[求助]哪路高手来帮帮!
综合练习:编程实现小学生算术练习系统,要求主菜单包括5项(加法,减法,乘法,除法,退出),而前4项中每一项又包括子菜单(子菜单包括4项:一级练习,二级练习,三级练习,返回),其中一级实现10以内的整数运算,二级实现50以内的整数运算,三级实现100以内的整数运算.进入某一级后,反复练习(由机器产生两个随机数,用户输入运算结果,输出正确"RIGHT"或者错误"WRONG"),等用户选择"返回"后,给出本级题目中计算正确的百分比.

这道题小D不思其解!请来帮帮!
搜索更多相关主题的帖子: 一级 小学生 子菜单 百分比 用户 
2005-06-07 15:48
ぷ螞蟻じpoPo
Rank: 1
等 级:新手上路
帖 子:42
专家分:0
注 册:2005-6-7
得分:0 
无奈本人新学C++,偶也不懂!!

顶顶!!!

爱骗人的女人,给老子趁早滚开。 不知道爱情是啥玩意的,你就回家去种菜。 只认识钱的女人,你就床上呆着去。 只回被爱不回爱别人的女人(还是人吗)
2005-06-07 17:30
yan704
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2005-5-19
得分:0 
晕啊!
有没有人会啊!
急救中啊!
2005-06-07 23:44
shan183
Rank: 1
等 级:新手上路
帖 子:60
专家分:0
注 册:2005-5-30
得分:0 
我用VC还不会做,不过用VB做起来还是很简单的呦!哈哈,说了一句废话!不好意思!
2005-06-08 16:03
yan704
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2005-5-19
得分:0 
用TC做可以做出来吗?
2005-06-08 18:07
yan704
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2005-5-19
得分:0 
有那位高手可以来帮帮忙啊!
谢谢啦~!
2005-06-10 00:10
白梦云
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-6-10
得分:0 
vc 很简单啊
2005-06-10 09:19
lumin
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-6-12
得分:0 
我是菜鸟,前几天写个学生管理的,我想来试试,请楼主把"10以内的整数运算"解释清楚下,不知道是两个操作数是10以内,还是结果是10以内,谢谢~
还有除法是不是只要整除的~

[此贴子已经被作者于2005-6-12 18:59:51编辑过]


2005-06-12 18:56
风凌
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-6-12
得分:0 

我是菜鸟啦!~ 菜鸟用菜办法。。。 //main.cpp #include<iostream.h> void f1(int a); void f2(int a); void f3(int a); void f4(int a); void main(){ cout<<"**********************************************"<<endl; cout<<"** **"<<endl; cout<<"** 小学生算术练习系统 1.0V **"<<endl; cout<<"** **"<<endl; cout<<"**********************************************"<<endl; cout<<"请选择运算类型:(1-5)"<<endl; cout<<"1.加法。"<<endl; cout<<"2.减法。"<<endl; cout<<"3.乘法。"<<endl; cout<<"4.除法。"<<endl; cout<<"5.退出。"<<endl;

int a; cin>>a; switch(a){ case 1:f1(a);break; case 2:f2(a);break; case 3:f3(a);break; case 4:f4(a);break; case 5:break; //1.cpp #include<iostream.h> #include<stdlib.h> #include<time.h> #include<string.h> void f1(int a){ srand(time(0)); int k,x,y,z; double r=0.0,w=0.0; char b='y'; n cout<<endl; cout<<"请输入序号:(1-4)"<<endl; cout<<"1.简单"<<endl; cout<<"2.中等"<<endl; cout<<"3.高级"<<endl; cout<<"4.退出"<<endl; cin>>k; switch(k){ case 1: while(b=='y'||b=='Y') {x=rand()%10; y=rand()%10; cout<<x<<'+'<<y<<'='; cin>>z; if(z==x+y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} goto no;

} case 2: while(b=='y'||b=='Y') {x=rand()%50; y=rand()%50; cout<<x<<'+'<<y<<'='; cin>>z; if(z==x+y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} } case 3: while(b=='y'||b=='Y') {x=rand()%100; y=rand()%100; cout<<x<<'+'<<y<<'='; cin>>z; if(z==x+y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} case 4:break; default:{ cout<<"输入有误,重新输入!"<<endl; goto no;} } } } //2.cpp #include<iostream.h> #include<stdlib.h> #include<time.h> #include<string.h> void f2(int a){ srand(time(0)); int k,x,y,z; double r=0.0,w=0.0; char b='y'; n cout<<endl; cout<<"请输入序号:(1-4)"<<endl; cout<<"1.简单"<<endl; cout<<"2.中等"<<endl; cout<<"3.高级"<<endl; cout<<"4.退出"<<endl; cin>>k; switch(k){ case 1: while(b=='y'||b=='Y') {x=rand()%10; y=rand()%10; cout<<x<<'-'<<y<<'='; cin>>z; if(z==x-y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;}

} case 2: while(b=='y'||b=='Y') {x=rand()%50; y=rand()%50; cout<<x<<'-'<<y<<'='; cin>>z; if(z==x-y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} } case 3: while(b=='y'||b=='Y') {x=rand()%100; y=rand()%100; cout<<x<<'-'<<y<<'='; cin>>z; if(z==x-y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} case 4:break; default:{ cout<<"输入有误,重新输入!"<<endl; goto no;} } } } //3.cpp #include<iostream.h> #include<stdlib.h> #include<time.h> #include<string.h> void f3(int a){ srand(time(0)); int k,x,y,z; double r=0.0,w=0.0; char b='y'; n cout<<endl; cout<<"请输入序号:(1-4)"<<endl; cout<<"1.简单"<<endl; cout<<"2.中等"<<endl; cout<<"3.高级"<<endl; cout<<"4.退出"<<endl; cin>>k; switch(k){ case 1: while(b=='y'||b=='Y') {x=rand()%10; y=rand()%10; cout<<x<<'*'<<y<<'='; cin>>z; if(z==x*y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;}

} case 2: while(b=='y'||b=='Y') {x=rand()%50; y=rand()%50; cout<<x<<'*'<<y<<'='; cin>>z; if(z==x*y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} } case 3: while(b=='y'||b=='Y') {x=rand()%100; y=rand()%100; cout<<x<<'*'<<y<<'='; cin>>z; if(z==x*y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} case 4:break; default:{ cout<<"输入有误,重新输入!"<<endl; goto no;} } } } //4.cpp #include<iostream.h> #include<stdlib.h> #include<time.h> #include<string.h> void f4(int a){ srand(time(0)); int k,x,y,z; double r=0.0,w=0.0; char b='y'; n cout<<endl; cout<<"请输入序号:(1-4)"<<endl; cout<<"1.简单"<<endl; cout<<"2.中等"<<endl; cout<<"3.高级"<<endl; cout<<"4.退出"<<endl; cin>>k; switch(k){ case 1: while(b=='y'||b=='Y') {x=rand()%10; y=rand()%10; cout<<x<<'/'<<y<<'='; cin>>z; if(z==x/y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;}

} case 2: while(b=='y'||b=='Y') {x=rand()%50; y=rand()%50; cout<<x<<'/'<<y<<'='; cin>>z; if(z==x/y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} } case 3: while(b=='y'||b=='Y') {x=rand()%100; y=rand()%100; cout<<x<<'/'<<y<<'='; cin>>z; if(z==x/y){cout<<"Right"<<endl;r++;} else {cout<<"Wrong"<<endl;w++;} cout<<"继续练习?(Y/N)"; cin>>b; if(b!='y'){cout<<"正确率是:"<<double(r/(r+w))*100<<'%'<<endl;goto no;} case 4:break; default:{ cout<<"输入有误,重新输入!"<<endl; goto no;} } } }

2005-06-12 19:09
lumin
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2005-6-12
得分:0 
都写出来了
我今天才看见楼主发的的

[此贴子已经被作者于2005-6-12 19:11:51编辑过]


2005-06-12 19:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-20318-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.780186 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved