Sale!

Lab Exercise 5.2 COMP 248

$30.00 $18.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

Question: Today you are to write a program that will accept a single word from a user, which you store in a
String variable. With the use of loops and nested loops you are to produce a specific pattern with the characters
of the word as illustrated in the figures below.
So after initializing your variables, you are to retrieve a single word String input from the user and then find the
appropriate combination of for loops to display each character exactly as displayed in the two samples below.
Your code must work no matter what word the user enters.
The box below illustrates how your program should behave and appear.
REMEMBER in the output: ◦ is a space,  is a tab and ↵ is a new line. Text in green
is user input
Note 1: You are to expect a perfect user who will always enter 1 word; that is, do not verify the validity of user
input.
Note 2: The use of libraries other than java.util.Scanner is prohibited. Your program must work for any strings
entered, not just the ones in the samples above.
Note 3: You may need more than one nested loop to solve the problem.
Note 4: Final thought, remember that your solution is case-sensitive and space-sensitive and fulfill the above
instructions carefully and precisely.
Enter◦a◦string:◦Julien↵

J u l i e n ↵
u l i e n ↵
l i e n ↵
i e n ↵
e n ↵
n ↵
e n ↵
i e n ↵
l i e n ↵
u l i e n ↵
J u l i e n
Enter◦a◦string:◦Maya↵

M a y a ↵
a y a ↵
y a ↵
a ↵
y a ↵
a y a ↵
M a y a