0

Pls help with code

From the keyboard is entered a sequence of numbers, check whether the condition is correct: the number of multiples of 5 and multiple 3. Sequence of numbers: 1; 2; 3; 4; 5; 6; 9

26th Nov 2017, 6:54 PM
Brightlow
Brightlow - avatar
2 Antworten
0
If a number is divisible by 3 and 5, it is divisible by 15. So you can check if the number % 15 equals 0.
26th Nov 2017, 8:20 PM
Timon Paßlick
0
Thanks
27th Nov 2017, 9:50 AM
Brightlow
Brightlow - avatar