Write cpp program that declare string variable called apple


Problem

Write a complete, working C++ program that does the following:

1. Declare a string variable called apple.

2. Prompt for and read in a mixed-case (i.e., having a combination of upper-and lower-case letters) sentence in one line (that can include spaces) into an apple.

3. Print out the length of this mixed-case sentence.

4. Now, prompt for and read in a single character that will be used to find the number of occurrences of either the upper-case version or lower-case version pf the letter in the string (e.g., for the letter 'a', you would count the number of times you find either the letter 'a' or 'A' in the string).

5. Finally, print out the number of occurrences (either upper- or lower-case) of the character found in the string.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write cpp program that declare string variable called apple
Reference No:- TGS03354375

Expected delivery within 24 Hours