<分区>
我正在使用 rand() 生成随机数并将其显示在算术问题的上下文中。我每次都得到相同的两个数字。我如何让这些每次都不同?
#include <iostream>
#include<cstdlib>
using namespace std;
int main()
{
int numberOne = rand()%1000;
int numberTwo = rand()%1000;
int numberThree = numberOne + numberTwo;
char input;
cout << " " << numberOne << endl;
cout << "+" << numberTwo << endl;
cout << "----";
cin.get();
cout << numberThree << endl;
}