top of page
30
C/C++ Program for Find the largest multiple of 2, 3 and 5.
program solution
TRY IT YOURSELF
This problem is a variation of “Find the largest multiple of 3“ of Question no. 22.
Since the number has to be divisible by 2 and 5, it has to have last digit as 0. So if the given array doesn’t contain any zero, then no solution exists.
Once a 0 is available, extract 0 from the given array. Only thing left is, the number should be is divisible by 3 and the largest of all.
Email your compiled program with output to coffeewithcodes@gmail.com
Output
bottom of page