#include <iostream>
#include"stdlib.h"
#include"time.h"
using namespace std;
int main()
{
int n=10,c,t=0,i;
float d,a,b;
srand(time(NULL));
for(i=0;i<10;i++)
{
a=rand()%100;
b=rand()%100;
c=rand()%4;
cout<<"第"<<i+1<<"题"<<endl;
if(c==0)
{
cout<<a<<"+"<<b<<"=";
cin>>d;
if(d==a+b)
t++;
}
else if(c==1)
{
cout<<a<<"-"<<b<<"=";
cin>>d;
if(d==a-b)
t++;
}
else if(c==2)
{
cout<<a<<"*"<<b<<"=";
cin>>d;
if(d==a*b)
t++;
}
else
{
cout<<a<<"/"<<b<<"=";
cin>>d;
if(d==a/b)
t++;
}
}
cout<<t<<endl;
}
#include"stdlib.h"
#include"time.h"
using namespace std;
int main()
{
int n=10,c,t=0,i;
float d,a,b;
srand(time(NULL));
for(i=0;i<10;i++)
{
a=rand()%100;
b=rand()%100;
c=rand()%4;
cout<<"第"<<i+1<<"题"<<endl;
if(c==0)
{
cout<<a<<"+"<<b<<"=";
cin>>d;
if(d==a+b)
t++;
}
else if(c==1)
{
cout<<a<<"-"<<b<<"=";
cin>>d;
if(d==a-b)
t++;
}
else if(c==2)
{
cout<<a<<"*"<<b<<"=";
cin>>d;
if(d==a*b)
t++;
}
else
{
cout<<a<<"/"<<b<<"=";
cin>>d;
if(d==a/b)
t++;
}
}
cout<<t<<endl;
}