0

It is supposed to generate two numbers based on the user's preference of the highest number to use. What I want it to do is to divide integers that result in integers or perfectly whole numbers. I do not want to have numbers that don't divide out with remainders. So I set up the multiplication of two numbers, then divided the quotient with the divident or divisor, but it is coming up with some weird numbers that doesn't equal to whole numbers without remainders.

```
void divfunction()
{
unsigned int number1 = 0;So
unsigned int number2 = 0;
srand(unsigned(time(0)));
int totaldivcorrect = 0;
int totaldivwrong = 0;
int multresult;
highestNum = getHighestNum();
numquestions = getNumQuestions();
for (int count = 1; count <= numquestions; count++)
{
number1 = 1+rand() % highestNum;
number2 = 1+rand() % highestNum;
cout << number1 << " / " << number2 << " = " << endl;
multresult = number1 * number2;
correctanswer = multresult/number1;
cin >> studentanswer;
// Determines the winner
determinewinner();
```