Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You have a friend who is an English major. This friend needs to collect statistics about words for a project . The statistics are the number of vowels , consonants and letters that occur in a sequence of words. You offer to help by writing a program to aid in generating these statistics. Your friends tell you that he wants to enter as many words as he can think of.when he is done using the program he wants to enter "bye" and have the statistics displayed on the screen .In order to complete this program you must write the following functions;

A function that takes as an in parameter a single character. If this character is a vowel (a, e, I, or, u) it will return true, otherwise it will return false. you must deal with the fact that these vowels could be uppercase or lowercase. To do this add, #include

A function that takes a string as an in parameter and three in/out parameters .The in/out parameters are three counters, the number of vowels, the number of constants, and the number of letters , this function will update these counters appropriately based on the contents of the string that was passed in.

A function which takes as in the parameters the three counters and displays them to the screen as shown in he example below.

Your main function should use a flag controlled loop to prompt the user for a string (single word) and if that string is not ("bye") call the function to update the statistics .if the string is"bye" exit the loop and call the function to display the statistics.

Please enter a word ("bye" to exit): hike
Please enter a word ("bye" to exit):bike
please enter a word("bye" to exit):run
please enter a word("bye" to exit):swim
please enter a word("bye" to exit):bye

vowels:6
constants:9
total letters:15

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9886205

Have any Question?


Related Questions in Computer Engineering

Question suppose a large array is maintained with the

Question : Suppose a large array is maintained with the following policy. The array is initially sorted. When new elements are added, they are inserted at the end of the array and counted. Whenever the number of new elem ...

Assignmenta sudden increase in the demand for smoke

Assignment A sudden increase in the demand for smoke detectors has left Acme Alarms with insufficient capacity to meet demand. The company has seen monthly demand from its retailers for its electronic and battery-operate ...

One of the assays your laboratory carries out requires a 2n

One of the assays your laboratory carries out requires a 2N HCl. You have a stock bottle of concentrated HCl with a specific gravity of 1.18 and purity of 36%. What volume of the concentrated HCl is required to make 250m ...

4nbspthe appendix to chapter one will be very useful in

4. The appendix to chapter one will be very useful in answering this question, if you need a refresher or introduction to regression analysis. The following equation is the regression results of a study on infant mortali ...

System analysis and designbarbara singleton manager of

system analysis and design. Barbara Singleton, manager of western regional sales at the WAMAP Company, requested that the IS department develop a sales force management and tracking system that would enable her to better ...

This subject is computer architecture organizationdraw a

This subject is computer Architecture organization Draw a flowchart showing the steps for a CPU program that uses programmed I/O to send a string consisting of 10 characters to a printer connected through a UART interfac ...

From the following information how would i work out the

"From the following information, how would I work out the standard error of the estimate for the regression model (in excel)? Multiple R=0.7545, Adjusted R Square=0.5077, Regression df=1, Residual df=7 SS=27.37 MS=3.91, ...

Please discuss the data hazards associated with pipelining

Please discuss the data hazards associated with pipelining with an example and how these hazards impact the performance gain associated with pipelining.

Make a function first-char that consumes a nonempty string

Make a function first-char that consumes a nonempty string and produces a string consisting of the first character in the original string. Do not use string-ref.

Can someone please help in this question - if the the price

Can someone please help in this question - If the the price of a pack of 35-count Wipes box-pack increased by 12% while revenue from those wipes increased by 5%. Calculate the own-price elasticity of demand for Wipes box ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As