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, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Aobject is used for displaying the results of a question based on stored data. a. query b. report c. table d. form
Answers: 2
question
Computers and Technology, 25.06.2019 08:20
The process of representing data in digital form so it can be used by a digital computer is called decimal byterepresentation. - true or false
Answers: 3
You know the right answer?
Write a c++ program whose main function is merely a collection of variable declarations and function...
Questions
question
Chemistry, 05.05.2020 03:18
question
History, 05.05.2020 03:18
question
English, 05.05.2020 03:18
question
Mathematics, 05.05.2020 03:18
Questions on the website: 13722363