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, 21.06.2019 22:40
Write an assembly program with the following specifications.a). in the main block, you should have two registers r4 and r5. they should be checked in an infinite loop. if r4 is greater than r5, then the greater subroutine will be called. if r4 is less than r5, then the less subroutine will be called. if r4 equals r5, then no operations will be done
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Best laptops for college [$100-$500 range]?
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, 23.07.2019 01:30
question
Mathematics, 23.07.2019 01:30
question
Physics, 23.07.2019 01:30
question
Mathematics, 23.07.2019 01:30
Questions on the website: 13722360