Question: Write a program that prints the numbers from 1 to 150, with each number printed on its own line. For multiples of five print Jack

Write a program that prints the numbers from 1 to 150, withWrite a program that prints the numbers from 1 to 150, with each number printed on its own line. For multiples of five print "Jack" instead of the number For the multiples of seven print "Jill" instead of the number. For numbers which are multiples of both five and seven print "Went Up the Hill".

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!