I want to generate a set number of division questions. These questions must give an integer answer and not real number. Here's my code:
int tempNum1, tempNum2;
do // Cannot give decimal answers for students
{
tempNum1 = numGen.Next(minValue, maxValue);
tempNum2 = numGen.Next(minValue, maxValue);
} while (tempNum1 % tempNum2 != 0);
return String.Format("{0}/{1}", tempNum1, tempNum2);
Return values are stored in array, ready to be displayed. The problem is that generating takes too long; are there any solutions without needing to change the minV and maxV?