0

# Java Exercise

Someone help me in Java -if Number divide 3 print A -if Number divide 5 print B -if Number divide 3&5 print AB Plz help!!

1 Answer

+ 2

You can use module operator % for know integer remainder between 2 integers.
Ex.
5 % 2 = 1
20 % 3= 2
10 % 5 = 0
With this, you can solve easly the problem