Question: please fix code: errors: Homework 1-3 Textbook Section 5.17 Write a Java program that prompts the user for an int n. You can assume that



Homework 1-3 Textbook Section 5.17 Write a Java program that prompts the user for an int n. You can assume that 15 S 9. Your program should use embedded for loops that produce the following output: 21 3 2 1 4321 54321 n...54321 Your prompt to the user should be: Please enter a number 1...9: Please note that your class should be named Pattern Two. U Grades.java Pattern WU.Java IUR.Java import java.util.Scanner; class Pattern Two { e public static void main(String args[]) Scanner input=new Scanner(System.in); int n=0,1-0,j=0,k=0; System.out.println("Please enter a number 1...9: "); n=input.nextIntO; for(i=1;ii;j--){ System.out.print("\t"); for(; j>0;j--) { System.out.print(j + "\t"); System.out.println(); > > > Problems Javadoc Declaration Console 23
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
