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, 22.06.2019 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
What is the first view you place in your drawing?
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
You know the right answer?
Write a c++ program whose main function is merely a collection of variable declarations and function...
Questions
question
History, 18.07.2019 19:00
question
Arts, 18.07.2019 19:00