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

  Process centered organization differ from task-centered one

According to Hammer, how does a process centered organization differ from a task-centered one? What are the pros and cons of either approach?

  Create disaster recovery plan with a plan for system

Create Disaster Recovery Plan with a plan for system and network recovery, for a medium sized federal contractor whose main office is located in an area prone to natural disasters.

  What is the difference between coupling and cohesion

What is the difference between coupling and cohesion? Which should be minimized and which should be maximized and what complications are imposed if one tries to implement a dynamic list using a traditional homogeneous array?

  Secure windows-unix-linux servers from known shortcoming

The CIO has asked you to explain why you suggest it is so significant to secure your Windows and Unix/Linux servers from known shortcomings/vulnerabilities.

  Performance of computer if main memory speed remains same

Using a faster processor chip result in corresponding increase in performance of computer even if main memory speed remains the same.

  Suggest a way to find web servers for the department

Can you suggest a way to roughly find out the web servers (outside your department) which are not popular among the users in the department? Describe.

  Compute expected payback percentage of machine

Compute the expected "payback" percentage of the machine. In other words, for each coin played, what is the expected coin return?

  Design and test in logic works

Design and test in Logic works

  Fork function

Create a C program that takes an integer argument from the command line and outputs sum of all digits of the integer. For example, the result of the invocation sum of digits 12345 should be fifteen.

  Distinguish distances that moved their shopping carts

Performing 200 Nm of work. Both Brian and Dawn are exerting same amount of force (20 N). Distinguish the distances that Brian and Dawn moved their shopping carts.

  What is the primary role of chief information officer

What is the primary role of the Chief Information Officer in organizations today? If you are able, please use your own organization in your response.

  Write dimensions of memory containing bytes of storage

Write down the dimensions of a memory containing 1mb(2^20) bytes of storage? How large would the MAR be? how many bits are sent to the row column decoders?

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