Prompt for an input string and display output that shows the input string and the number of characters the string contains.
What is the input string? Homer
Homer has 5 characters.
- Be sure the output contains the original string.
- Use a single output statement to construct the output.
- User a built-in function of the programming language to determine the length of the string.
- string
- prompt for a string
- print the string and character count
- string with character count
Input:
- string: Homer
Expected result:
- output: Homer has 5 characters.
CountChars
Prompt for string with "What is the input string?"
Display string + " has " + count + " characters."
End