栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

c++小程序之加减法练习

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

c++小程序之加减法练习

闲来无事,用c++写了个加减法练习的小程序,代码如下:

#include
#include
#include 
#include
#include
using namespace std;
int score=0,counter=0,righter=0; 
const int rangeRandom(int nummin,int nummax=32767) 
{
    srand((int)time(NULL));
    if (nummin>nummax){
        swap(nummin,nummax);
    }
    int another_num=nummax-nummin;
    if (another_num<=0){ 
        return 0;
    }
    else if (another_num<32767){
        return nummin+(rand()%another_num);
    }
    else{
        return nummin+int(((rand()%32767)/32767)*another_num);
    }
}
const int plusused(int m,int n,int p,int q){
	int righter=0;
	cout<<"接下来我们开始做"<d;
	    c=a+b;
	    if(c==d){ 
		    cout<<"答对啦"<=0.8*p){
		if(q<=3){	
		plusused(m+=10,n+=15,10,++q);
		}
	}
	else{
		cout<<"LOW  CORRECT  RATE"<d;
	    c=a-b;
	    if(c==d){ 
		    cout<<"答对啦"<=0.8*z){
		if(u<=3){	
		minusused(x+=10,y+=15,10,++u);
		}
	}
	else{
		cout<<"LOW  CORRECT  RATE"<0){
			    cout<0){
				cout<>e;
		if(e==d){
			cout<<"答对啦"<=0.8*mc){
		if(md<=3){	
		minusused(ma+=10,mb+=15,10,++md);
		}
	}
	else{
		cout<<"LOW  CORRECT  RATE"< 

本人c++小白,程序写的可能不大好,求各位大神指教~

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/916860.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号