How to call the function to update the statistics

Assignment Help Basic Computer Science
Reference no: EM13306884

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<Q-tip. To the top of your program, then you may also use the function tolower with prototype char tolower (char), to convert a character to lowercase before deciding if it is a vowel or not .

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

Reference no: EM13306884

Questions Cloud

What is the maximum amount of energy : The motor in a refrigerator has a power of 156 W. If the freezing compartment is at 268 K and the outside air is at 302 K, what is the maximum amount of energy
Create a fully unbalanced bst : I need to create a program written in Java. It needs to create a fully unbalanced BST. It must have 26 levels. It must demonstrate the insertion of elements into the BST.
Find the final temperature of the iron block : A 3.5-kg block of iron (c=0.11 kcal/kgoC) that has been brought to a temperature of 1,063oC is placed on top of a 2.5-kg block of ice (c=0.5 kcal/kgoC) that has been cooled to -50oC
Claim myrtle under a multiple support agreement : Myrtle is fully supported by her three children and Fred, a close friend of the family. Mark paid $4,000 toward Myrtle's support, while Nancy, Opel, and Fred paid $3,200, $ 800, and $2,000 respectively. Which individual are eligible to claim My..
How to call the function to update the statistics : A function which takes as in the parameters the three counters and displays them to the screen as shown in he example below.
What is the impedance of this circuit : A 150 ohm resistor, a 30 mH inductor and a 2 uF capacitor are connected in series with a 120 V rms source at 1500 Hz. What is the impedance of this circuit
Accounting reports are a major tool in business : Given Mountainarious Sporting Co.'s financial statements for the period 2004 to 2007 you are to undertake appropriate vertical, horizontal and ratio analysis of those financial statements
Explain different levels in a software organization : Give at least three examples of where decision making process could be used at different levels in a software organization.
Estimate the power the device can produce at a wind speed : The U.S. Department of Energy (DOE) constructed a Darrieus vertical-axis wind turbine in Sandia, New Mexico. The machine is 60.0-ft tall and 30.0-ft in diameter, and swept an area of 1200 ft 2.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd