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!!

7th Feb 2022, 6:04 AM
Samnang Choeurn
Samnang Choeurn - avatar
1 ответ
+ 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
7th Feb 2022, 6:17 AM
KrOW
KrOW - avatar