标签:
#include<iostream>
#include<math.h>
#include<time.h>
using namespace std;
void main()
{
srand(time(0));
int a, b, c;
for (int i = 0; i < 30; i++)
{
a = rand() % 100;
b = rand() % 100;
c = rand() % 4;
if (c == 0)
{
cout << a << "+" << b << "=" << endl;
}
if (c == 1)
{
cout << a << "-" << b << "=" << endl;
}
if (c == 2)
{
cout << a << "*" << b << "=" << endl;
}
if (c == 3)
{
cout << a << "/" << b << "=" << endl;
}
}
}
标签:
原文地址:http://www.cnblogs.com/lyhao/p/5245342.html