CMIS 150 Pascal Term 5 1991 SHAPE Howmework #1 Due 10 June Write a program that will count the number of words in a file of text. A word is defined to be any sequence of non-blank characters. Have the program query the user as to where the input is to come from, either in a disk file or in the standard input (the keyboard) (remember that file INPUT is just a predeclared file of type text). Use a function to process through the file, counting the number of words. The function will be passed a parameter of type text so that it knows which file to work on. The function's returned value will be the number of words in the file. In the function use the basic While Not Eof... While Not Eoln nested loops to read through the file. The tricky coding part of this program is an algorithm to count the words (but it is not complex!). Also, allow the user to process as many files as desired one after another (don't end the program after just one file has had its words counted). Example file of text: ------------------------------------------- hello this file contains a number of words. 11 of them! ------------------------------------------- Watch out for: more than one blank between words, lines that start with blanks, lines that have blanks after the last word, lines with nothing but blanks, lines with nothing (CR only).