Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2) (13 points) You've been hired by Character Koalas to write a C++ console application that analyzes the types of characters in a string entered
2) (13 points) You've been hired by Character Koalas to write a C++ console application that analyzes the types of characters in a string entered by the user. Prompt for and get from the user a string containing at least ten characters. Use getline to read the string. If the string contains fewer than ten characters, print a error message including the invalid string (and nothing else except the application close). If the string contains at least ten characters, test the characters at indexes 2, 4, 6, and 8 to determine the following: Is the character upper case? Is the character a digit? Is the character punctuation? Use formatted output manipulators (setw, left/right) to print the rows and columns shown below. Define constants for the column widths. The output should look like this for invalid input: Welcome to Character Koalas Enter a string with at least ten characters: not much Error: string 'not much' does not have at least ten characters. End of Character Koalas The output should look like this for valid input: Welcome to Character Koalas Enter a string with at least ten characters: WSU 1868 11 Output key: zero-false; non-zero-true String: Length: WSU 1868 11 Character at index 2: -Upper? -Digit? -Punct? Character at index 4: -Upper? -Digit? -Punct? Character at index 6: -Upper? -Digit? -Punct? Character at index 8: -Upper? -Digit? -Punct? End of Character Koalas
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started