Math - Remainders - Challenge (Java)

Hey folks, it’s me again!
So this is my implementation of the remainders in Java with two varieties :slight_smile:

In the first picture you can see the version with the Switch-Case implementation.
In the second one you can see the if-else implementation.

Short explanation of “Integer.MAX_VALUE”:
I used it to create a random number between 0 and the maximum value of integers (2^32-1)
So it chooses a number between 0 and 2^32-1 and then again -1 so (2^32)-2.

Hope that was clear enough to understand. If there is something I can do better, please let me know :slight_smile:

Have a great day!

That looks really good! Good to see that you use Java to solve the math problem!

Kind regards,
Lisa

Privacy & Terms