Question: Write a method called hopscotch that accepts an integer number of hops as its parameter and prints a pattern of numbers that resembles a hopscotch
Write a method called hopscotch that accepts an integer number of “hops” as its parameter and prints a pattern of numbers that resembles a hopscotch board. A “hop” is a three-number sequence where the output shows two numbers on a line, followed by one number on its own line. 0 hops is a board up to 1; one hop is a board up to 4; two hops is a board up to 7; and so on. For example, the call of hopscotch(3); should print the following output:

A call of hopscotch(0); should print only the number 1. If it is passed a negative value, the method should produce no output.
2 3 5. 6. 8 9. 10 4.
Step by Step Solution
3.52 Rating (179 Votes )
There are 3 Steps involved in it
public static ... View full answer
Get step-by-step solutions from verified subject matter experts
