Question: program that prompts the user to input two (2) integer values; a starting value and an end value. Loop through all the values from start

program that prompts the user to input two (2) integer values; a starting value and an end value. Loop through all the values from start to end, which should include the start and end values. For each value: If the number is divisible by both 3 and 5, print the word "ticktock". For example for 15, 30, and 45 you would print "ticktock". Else if it is a multiple of 3 (value % 3 == 0), print the word "tick". For example, for 3, 6, and 9 you would print "tick". Else if it is a multiple of 5 (value % 5 == 0) , then print "tock". For example, for 5, 10, and 20 you would print "tock". Else if it is not divisible by 3 or 5, print the number. For example, for 1 you would just print '1'.

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 Programming Questions!