Question: Write a PHP program that prints the numbers from 1 to 100, one per line. For multiples of three print Tick instead of the number
Write a PHP program that prints the numbers from 1 to 100, one per line.
For multiples of three print Tick instead of the number and for the multiples of five print Tock. For numbers which are multiples of both three and five print TickTock.
Sample Output:
1
2
Tick
4
Tock
Tick
7
8
Tick
Tock
11
Tick
13
14
TickTock
etc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
