Exercise 12.2: writeNums
Write a method
writeNums that accepts an integer parameter n and prints the first n integers starting with 1 in sequential order, separated by commas. For example, the following calls produce the following output:
Your method should throw an
IllegalArgumentException if passed a value less than 1. Note that the output does not advance to the next line.
Contacting server and running tests...
Is there a problem?
Contact a Practice-It administrator.