Computers and Technology

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.

answer
Answers: 1

Similar questions

Do you know the correct answer?
6.13: word count
write a program that prompts the user to input the name of a text file and t...

Questions in other subjects:

Konu
Mathematics, 27.01.2021 03:40