Question: How would I go about: Setting up the output to display 10 values per line. Adding a step that verifies wether or not the input

 How would I go about: Setting up the output to display

How would I go about:

Setting up the output to display 10 values per line.

Adding a step that verifies wether or not the input is a positive integer and responds appropriately if not.

public static void main(String[] args) { Scanner count = new Scanner(System.in); int blastoff = 0; System.out.println("What number should I count down from? "); int countDown = Integer.parseInt(count. nextLine()); while (countDown >= blastoff) { System.out.println(countDown); countDown--; } System.out.println("Blast Off!"); } }

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!