Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions