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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
image
Computers and Technology, 24.06.2019 02:20, isabelsmhl
Peter is thinking of a number which isless than 50. the number has 9 factors. when he adds 4 to the number, itbecomes a multiple of 5. what is thenumber he is thinking of ?
Answers: 1
image
Computers and Technology, 24.06.2019 02:50, rurbanok12
Be sure to answer all parts. synthesize the following compound from benzene. a. b. c. d. e. f. reaction [1] conditions: a b c d e f reaction [1] product: draw structure reaction [2] conditions: a b c d e f reaction [2] product: draw structure reaction [3] conditions: a b c d e f reaction [3] product:
Answers: 3
image
Computers and Technology, 25.06.2019 10:30, KillerSteamcar
Tools used in a particular career depend on the tasks performed. true or false
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 in other subjects:

Konu
Health, 26.09.2019 05:50
Konu
Biology, 26.09.2019 05:50