i have this code and i am trying to make this
cout << (rand () % (1 + max - min) + min ) << "\t";
into something like this
cout << rand (range) << "\t";
and this the code
#include <iostream>
using namespace std;
int main ()
{
srand ((unsigned int) time(0));
int min, max;
cout << "Enter a min. number." << endl;
cin >> min;
cout << "Enter a max. number." << endl;
cin >> max;
for ( int j= 0; j < 10; j++ )
{
for ( int i = 0; i < 10; i++)
{
cout << (rand () % (1 + max - min) + min ) << "\t";
}
cout << endl;
}
}