subject

Write a program that reads a given text file, outputs the text file as is, and also prints the number of lines and the number of times each letter appears in the text file. (to simplify things, treat uppercase letters and lowercase letters as being the same.)
create an array of 26 components to do the letter count for the 26 letters in the alphabet and a variable for the line count. (you may wish to call these variables lettercount and linecount respectively.)
hint: use the plan of declaring variables, opening input and output files, initializing the variables, reading and writing the character for each character in a line, incrementing the letter count, incrementing the line count, outputting line and letter counts and, finally, closing the input and output files. (you may wish to call the program outputting line and letter counts writetotal.)
create an ascii (or text) file that contains text that will be used as input to your program. call this file textinput.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
You know the right answer?
Write a program that reads a given text file, outputs the text file as is, and also prints the numbe...
Questions
question
Mathematics, 12.12.2020 16:00
question
Mathematics, 12.12.2020 16:00
question
Mathematics, 12.12.2020 16:00
Questions on the website: 13722367