java code question !!

Oct 12th, 2014
HelloWorld
Category:
Programming
Price: $50 USD

Question description

(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 

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: UIUC
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
Five Star Tutor
Dec 4th, 2016
" Outstanding Job!!!! "
kpcutie
Nov 21st, 2016
" Excellent job "
Joemoe
Nov 12th, 2016
" <3 it, thanks for saving me time. "
Hemapathy
Nov 7th, 2016
" all I can say is wow very fast work, great work thanks "
pmallory
Oct 29th, 2016
" Totally impressed with results!! :-) "
kevin12622
Oct 16th, 2016
" Goes above and beyond expectations ! "
kiln82
Oct 7th, 2016
" awesome work thanks "
likeplum4
Sep 23rd, 2016
" Excellent work as usual "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1823 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors