You can use either C-Strings (technically an array) or CPP Strings. Write a program that ... Continuously prompts the user for a string and counts the number of vowels {'a', 'e', 'i', 'o', 'u'} in it. Display the number of a's, e's, etc. in the given string. The program is to loop until the user enters the sentinel value "stop" (do not return the number of vowels when the user enters the sentinel value). Keep track of the total number of each vowel and display a summary of the resulting number of each vowel. Use the below data as your input. Your output should match the given output.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In C++

Vowel Counter
Enter a string
(Enter "stop" to terminate program): The Cat in the Hat.
Number of a's: 2
Number of e's: 2
Number of i's: 1
Number of o's: 0
Number of u's: 0
Enter a string
(Enter "stop" to terminate program): The sun did not shine.
Number of a's: 0
Number of e's: 2
Number of i's: 2
Number of o's: 1
Number of u's: 1
Enter a string
(Enter "stop" to terminate program): Too wet to go out
Number of a's: 0
Number of e's: 1
Number of i's: 0
Number of o's: 5
Number of u's: 1
Enter a string
(Enter "stop" to terminate program): stop
Grand Total of a's: 2
Grand Total of e's: 5
Grand Total of i's: 3
Grand Total of o's: 6
Grand Total of u's: 2
Transcribed Image Text:Vowel Counter Enter a string (Enter "stop" to terminate program): The Cat in the Hat. Number of a's: 2 Number of e's: 2 Number of i's: 1 Number of o's: 0 Number of u's: 0 Enter a string (Enter "stop" to terminate program): The sun did not shine. Number of a's: 0 Number of e's: 2 Number of i's: 2 Number of o's: 1 Number of u's: 1 Enter a string (Enter "stop" to terminate program): Too wet to go out Number of a's: 0 Number of e's: 1 Number of i's: 0 Number of o's: 5 Number of u's: 1 Enter a string (Enter "stop" to terminate program): stop Grand Total of a's: 2 Grand Total of e's: 5 Grand Total of i's: 3 Grand Total of o's: 6 Grand Total of u's: 2
You can use either C-Strings (technically an array) or CPP Strings.
Write a program that ...
Continuously prompts the user for a string and counts the number of vowels {'a', 'e', 'i', 'o', 'u'} in it.
Display the number of a's, e's, etc. in the given string.
The program is to loop until the user enters the sentinel value "stop" (do not return the number of vowels when the user enters the sentinel value).
Keep track of the total number of each vowel and display a summary of the resulting number of each vowel.
Use the below data as your input. Your output should match the given output.
Transcribed Image Text:You can use either C-Strings (technically an array) or CPP Strings. Write a program that ... Continuously prompts the user for a string and counts the number of vowels {'a', 'e', 'i', 'o', 'u'} in it. Display the number of a's, e's, etc. in the given string. The program is to loop until the user enters the sentinel value "stop" (do not return the number of vowels when the user enters the sentinel value). Keep track of the total number of each vowel and display a summary of the resulting number of each vowel. Use the below data as your input. Your output should match the given output.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education