Write a program that prints the numbers from 1 to 100. But for number is divisible of three print is divisible to 3
instead of the number and for the number is divisible of five print is divisible to 5
.
For numbers which are divisible of both three and five print is divisible to 3 and 5
. Remember, you can use the modulus operator to check if a number is divisible by another number.
output should like this below
1
2
3 is divisible to 3
4
5 is divisible to 5
6 is divisible to 3
... up to 100