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
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.
|