Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a C++ program that utilizes loops and conditions to make sure an entire word is lowercase. You should: Get a string input from the
Create a C++ program that utilizes loops and conditions to make sure an entire word is lowercase.
You should:
- Get a string input from the user (you can accept multiple words or not; I encourage multiple)
- Print the input the user has given you
- Loop through the string
- Hint: treat it like an array
- You're going through letter by letter
- Think: variable[0] --> first letter of variable
- Check if a character is uppercase
- If it is, replace it with the lowercase version of itself
- So, example:
- variable[index] = lowercase letter
- Print the altered, lowercase version of the input
HINTS:
- variable.length() -- works on a string variable, returns the length of the string
- isupper(item) -- send an item to this; returns boolean true or false
- tolower(item) -- send an item to this; returns the lowercase version
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