Programming Homework Help

Programming Homework Help. java code question !!

(Display four patterns using loops) Ask the user to enter an integer  to
set a limit for nested loops and generate the following four patterns:

Enter an integer  to be a limit of the pattern:6
Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 

Pattern B:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 

Pattern D:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

SAMPLE RUN #1

— Prompts For Keyboard/Console/Standard Input —

Enter an integer  to be a limit of the pattern:

Inputs

— Keyboard/Console/Standard Input stdin —

4 

Outputs 

— Monitor/Console/Standard Output  —

Enter an integer  to be a limit of the pattern:Pattern A:

1 2 
1 2 3 
1 2 3 4 

Pattern B:
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 

Pattern D:
1 2 3 4 
1 2 3 
1 2 

What The Console Looks Like In An Interactive Session:

(Note: this combines standard input with standard output )

>java LoopPattern 
Enter an integer  to be a limit of the pattern: 4 
Pattern A:

1 2 
1 2 3 
1 2 3 4 

Pattern B:
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 

Pattern D:
1 2 3 4 
1 2 3 
1 2 

SAMPLE RUN #2

— Prompts For Keyboard/Console/Standard Input —

Enter an integer  to be a limit of the pattern:

Inputs

— Keyboard/Console/Standard Input stdin —

6 

Outputs 

— Monitor/Console/Standard Output  —

Enter an integer  to be a limit of the pattern:Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 

Pattern B:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 

Pattern D:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

What The Console Looks Like In An Interactive Session:

(Note: this combines standard input with standard output )

>java LoopPattern 
Enter an integer  to be a limit of the pattern: 6 
Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 

Pattern B:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 

Pattern D:
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

SAMPLE RUN #3

— Prompts For Keyboard/Console/Standard Input —

Enter an integer  to be a limit of the pattern:

Inputs

— Keyboard/Console/Standard Input stdin —

8 

Outputs 

— Monitor/Console/Standard Output  —

Enter an integer  to be a limit of the pattern:Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 
1 2 3 4 5 6 7 
1 2 3 4 5 6 7 8 

Pattern B:
1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 
7 6 5 4 3 2 1 
8 7 6 5 4 3 2 1 

Pattern D:
1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

What The Console Looks Like In An Interactive Session:

(Note: this combines standard input with standard output )

>java LoopPattern 
Enter an integer  to be a limit of the pattern: 8 
Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 
1 2 3 4 5 6 7 
1 2 3 4 5 6 7 8 

Pattern B:
1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 
7 6 5 4 3 2 1 
8 7 6 5 4 3 2 1 

Pattern D:
1 2 3 4 5 6 7 8 
1 2 3 4 5 6 7 
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

SAMPLE RUN #4

— Prompts For Keyboard/Console/Standard Input —

Enter an integer  to be a limit of the pattern:

Inputs

— Keyboard/Console/Standard Input stdin —

5 

Outputs 

— Monitor/Console/Standard Output  —

Enter an integer  to be a limit of the pattern:Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 

Pattern B:
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 

Pattern D:
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

What The Console Looks Like In An Interactive Session:

(Note: this combines standard input with standard output )

>java LoopPattern 
Enter an integer  to be a limit of the pattern: 5 
Pattern A:

1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 

Pattern B:
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Pattern C:

2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 

Pattern D:
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"