Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:00, leo4687
Complete the sentence about a presentation delivery method
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, MagicDragon4734
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, milkshakegrande101
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, Felixthecat7186
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a, b] se pot scrie ca produs de două numere prime? “.
Answers: 3
Do you know the correct answer?
Write a c++ program whose main function is merely a collection of variable declarations and function...

Questions in other subjects:

Konu
Chemistry, 16.07.2021 23:20
Konu
Mathematics, 16.07.2021 23:20