subject

6.13: word count
write a program that prompts the user to input the name of a text file and then outputs the number of words in the file. you can consider a “word” to be any text that is surrounded by whitespace (for example, a space, carriage return, newline) or borders the beginning or end of the file.
input notes: there are two input sources in this program: the text file and standard input. the standard input consists of a single word, the name of the text file to be read.

output notes (prompts and labels): the filename provided in standard input is prompted for with "enter a file name: " and displayed so that the filename entered is on the same line as the prompt.

the output of the program is a single line of the form: "the file contains n words." where n is the number of words determined by the program.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
question
Computers and Technology, 24.06.2019 09:50
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
After making a powerpoint presentation about a new line of clothing designs, henri notices that he used the word “gorgeous” on nearly every slide. what would be the  best  way to add more variety to his wording by using tools within powerpoint? using the thesaurus under the view tab, and then using the find dialog box to find and replace every instance of “gorgeous”using the spelling checker under the view tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the thesaurus under the review tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the spelling checker under the review tab, and then using the find dialog box to find and replace every instance of “gorgeous”
Answers: 2
You know the right answer?
6.13: word count
write a program that prompts the user to input the name of a text file and t...
Questions
question
Mathematics, 04.08.2019 18:30
question
Mathematics, 04.08.2019 18:30
Questions on the website: 13722361