懂C++的高手来帮我根据运行结果填下空~~~~~~~~~~~~

来源:百度知道 编辑:UC知道 时间:2024/06/05 06:14:38
根据后面的运行结果在___________处填空!!!!!!!!!!
#include "iostream.h"
#include "stdlib.h"
#include "time.h"
int main()
{
int a,b,numOfQues=0,numOfRight=0;
char inquiry;
srand(time(NULL));
cout <<"***欢迎你来做两位数的加减法***" <<endl;
___
{
int temp=rand()%2;
a=rand()%100;
b=rand()%100;
switch(____)
{
case 0:
{
int ans;
cout <<a <<'+' <<b <<'=';
cin >>ans;
if(________)
{
_________++;
cout <<"恭喜!答对了!" <<endl;
}
else cout <<"答错了,再接再厉!" <<endl;
__________;

#include "iostream.h"
#include "stdlib.h"
#include "time.h"
int main()
{
int a,b,numOfQues=0,numOfRight=0;
char inquiry;
srand(time(NULL));
cout <<"***欢迎你来做两位数的加减法***" <<endl;
while(numOfQues==0||inquiry=='y'||inquiry=='Y')///////////
{
int temp=rand()%2;
a=rand()%100;
b=rand()%100;
switch(temp) //////
{
case 0:
{
int ans;
cout <<a <<'+' <<b <<'=';
cin >>ans;
if(ans==a+b) ///////
{
numOfRight++; /////
cout <<"恭喜!答对了!" <<endl;
}
else cout <<"答错了,再接再厉!" <<endl;
break; //////
}
case 1:
{
int ans;
cout <<a