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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!