Question: java 1, please dont make code overly complex - Strings in a Loop Write a program LoopStringsjava . In this program we will explore the
- Strings in a Loop Write a program LoopStringsjava . In this program we will explore the use of for loops with and without Strings - including nested for loops! . Your program should do the following: Read in 3 Inputs: a String statement, a character, an integer (91) Use a fer-loop to print the character the String's length number of times (#2) Use a fer-loop to print the String substituting the integer for every odd Index Hint: Use and ur-statement to test for even or odd counts of the loop. (83) Use a for-loop to print the String substituting the character for every even index. (+4) Use a nested for loop to print the String out the number of times equal to the length of the String Hint: Use substring to fade the String (#5) Use a for-loop to calculate the factorial of the Integer. Note that you must use a for loop to calculate the factorial. Outside methods not allowed. Note that you will need to use a Teng datatype to store the result of your calcuation due to the length of the number (#6) Capitalize the first letter of each word. Hint: Use a for loop to locate the and capitalize the letter following the Hint: use substring to isolate the character, allowing you to call topperCase Sample Output: *** Fun with Loops and Strings *** Enter a String statement: hello world Enter one character: 2 Enter an integer between 1 and 19: 19 . the String Printing a string of z's the length hello world 1: ZZZZZZZZZZ 2-out the string Alternating printing 329 with the old letters of the String 22: 19e19119 19 1019119 An alteration from ention! Alternating printing with the even letters of the string 73: Pad As alteration from designation 14: Planting the first letters of the string from length to one. helle world Helle twort Mellom hello No hella i hello hello hello hello hell het Fading fast Printing 231. the product of the users between 1 and 19. 15: 1216451000 Alcune factorial Printing allerlathalards couloid :lle 1 Borld
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
