Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write an efficient C++ program that takes a string input (a single line) from the user and displays the number of words, characters, alphabets, vowels,
Write an efficient C++ program that takes a string input (a single line) from the user and displays the number of words, characters, alphabets, vowels, consonants and digits in that given string. For our purposes, characters are everything that isn't whitespace (tabs or spaces), alphabets are letters from a...z or A...Z, digits are from 0...9, and words are any non-whitespace characters separated by whitespace. So in the sentence "I have 32 oranges..., which is a strange thing. (!) " there are 10 words, including "I", "32" and "(!)" and treating "oranges...," as one word. If you are using any code developed in class, be sure to cite your teammates in the header comments. In order to placate the auto-grader, the output has to be in the order and format below: Number of alphabets =32 Number of vowels =12 Number of consonants =20 Number of digits =2 Number of characters =42 Number of words =10 465922.2641388.q3zqy7 4.10.1: String Report 6/16
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