subject

Write a c++ program whose main function is merely a collection of variable declarations and function calls. this program reads a text and outputs the letters, together with their counts, as explained below in the function printresult. (there can be no global variables! all information must be passed in and out of the functions. use a structure to store the information.)

your program must consist of at least the following functions:

- function openfile: opens the input and output files. you must pass the file streams as parameters (by reference, of course). if the file does not exist, the program should print an appropriate message and exit. the program must ask the user for the names of the input and output files.

- function count: counts every occurrence of capital letters a-z and small letters a-z in the text file opened in the function openfile. this information must go into an array of structures. the array must be passed as a parameter, and the file identifier must also be passed as a parameter.

- function printresult: prints the number of capital letters and small letters, as well as the percentage of capital letters for every letter a-z and the percentage of small letters for every letter a-z. the percentages should look like this: "25%". this information must come from an array of structures, and this array must be passed as a parameter.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What operating system is a smartphone most likely to use? 1.bsd 2.mac os x 3.symbian 4.linux
Answers: 1
question
Computers and Technology, 21.06.2019 23:00
What computer network component allows data transfers from one computer to another through a telephone line?
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
You know the right answer?
Write a c++ program whose main function is merely a collection of variable declarations and function...
Questions
question
History, 21.10.2020 01:01
question
Biology, 21.10.2020 01:01
Questions on the website: 13722360