Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago