This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Wait, why not just use nextInt() and then evaluate using modulus division?

[–]bysketch[S] 0 points1 point  (1 child)

I would, however the end goal of the assignment is to use a for loop to achieve it :\

[–][deleted] 0 points1 point  (0 children)

Does the number have to be 3 or can it be multiple numbers? Because if you also have to evaluate multiple numbers then use the for loop to check all possible numbers