Difficulty: Low
Title: CharAt
Description:
Write a program where the user enters a string, and the program echo's it to the monitor with one character per line:
Output:
Enter a string:
Octopus
O
c
t
o
p
u
s
Difficulty: Medium
Title: Name Echo
Description:
Write a program that asks for user's first and last name in one input and then writes it back with the first name as entered, and the second name all in capital letters. Assume that there are two names, and that they are separated by a single space character. Use the trim() method to remove possible leading spaces.
The following String methods will help you complete this exercise:
Output:
Enter your name: Sherlock Holmes
Sherlock HOLMES