Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this C++ programming assignment is to generate statistics from a given input text (i.e. a string). From this input text, we need

image text in transcribed
The purpose of this C++ programming assignment is to generate statistics from a given input text (i.e. a string). From this input text, we need know the number of words, the number of vowels, the number of punctuation characters and to check if the string "you" is existed in this text. To accomplish this assignment, you must do the following: Write a function called wordCounter that takes in a string as a parameter and returns the number of words in the string (hint: you can count spaces). Write a function called vowelcounter that takes in a string as a parameter and returns the total number of vowels in the string. You need to account for upper and lowercase letters. Write a function called puneCount that takes in a string as a parameter and returns the number of punctuation characters in the string. Write a function called findSubString that takes in a string as a parameter and returns 1 if the string "you" exists in the string and if it is not . In the main function, input the string from the user. Then, print all the 4 statistics based on this input string. Sample Run 1 Enter the input string: Maybe a story will cheer you up: Once upon a time, there was an ugly barnacle. It was so ugly, that everyone died. The end. Number of words: 25 Number of vowels: 38 Number of punctuations: 6 "you" is a part of this string

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

Step: 3

blur-text-image

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions