Reputation: 11
I have been trying to work out a way to generate a division equation, where the answer will always be a positive whole number (does not have decimals). This is a snippet of code that I'm using for 'addition' to grab the random numbers
SET /a Num2=(%Random% %%MaxNumber%)+1
echo %QuestNum%) %Num1% + %Num2% =
Upvotes: 1
Views: 313
Reputation: 19981
Choose the answer (which you presumably won't output) and the divisor at random; compute the dividend by multiplying the two (using set /a
).
Upvotes: 3