Question: Strings Exercise 2 Problem Write a program that captures input from the user, prints the inputted string as many times as its length, and prints
Strings Exercise
Problem
Write a program that captures input from the user, prints the inputted string as many times as its length, and prints as many lines of this as the length of the input string.
Here is what you have so far:
public class Exercise
public static void mainString args
String myString args;
add code below this line
MUS add code above this line
Click to compile your code
COMPILE CODE
Test your code with a few different values
TEST WITH CAT
Expected Output
TEST WITH TREE
Expected Output
TEST WITH @#&
Expected Output
Requirements
You should not make any changes to the code that already exists. If you accidentally delete any existing code, you can copy and paste the entire program from above.
You can use any number of string methods andor conditionals to produce the desired output.
Strings: Exercise
When your code is ready, click the button below to submit your work for grading.
Check It left
ANSWER MUST BE IN JAVA!!!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
