**New course!**Every coder should learn

**Generative AI!**

0

# Division without remainder - C#

I need a script to generate random Math exercices, but i want that division to be without remainder.

2 Answers

+ 5

For an algorithm, you can generate two numbers.
One number will be the answer and the other will be the divisor.
Multiply those two numbers to get the dividend.
Then, you ask your user to divide the dividend by the divisor.

+ 5

I really can't understand what you need. But I know you can find good package in Nuget package manger like Math.Net, Alglib,...
Math.Net example
https://numerics.mathdotnet.com/Random.html
[Edited] : after 👑 Prometheus 🇸🇬 comment i catch up what you need
After generating a random integer, you can get all the multiples of the number, using the for loop, but this seems difficult. Therefore, I recommend the Prometheus method.