Write a program that asks the user for input. Use a FOR loop to parse the string you get from the user, from start to fi
Posted: Mon May 09, 2022 6:04 am
Write a program that asks the user for input. Use a FOR loop to
parse the string you get from
the user, from start to finish. For each character in the string
report out:
If the character is a letter, output the UPPERCASE and LOWERCASE
version of the letter.
IF the character is a number, output the letter and the SQUARED
value of the number. For
example, if the character is 3, the program should output “The
original is 3” and “The square of 3
is 9”
If the character is a space, output the string “SPACE” (all
uppercase).
If the character is not a letter, number, or space, output
“<character> is a special character!”
Where <character> is the character you are examining.
parse the string you get from
the user, from start to finish. For each character in the string
report out:
If the character is a letter, output the UPPERCASE and LOWERCASE
version of the letter.
IF the character is a number, output the letter and the SQUARED
value of the number. For
example, if the character is 3, the program should output “The
original is 3” and “The square of 3
is 9”
If the character is a space, output the string “SPACE” (all
uppercase).
If the character is not a letter, number, or space, output
“<character> is a special character!”
Where <character> is the character you are examining.