Compute the average length of sentences?
Posted on 2002-03-08
I am not familiar when dealing with file in pascal.The question is how do I construct a program that reads a file containing a love letter or something familiar and computes the avarege length of sentences in it.Sentences are terminated by '.'(full stop).The length of a sentence is defined to be the number of words in it.Words in sentences are separated by at least a ' '(space).
This is how far I can go.I use Pascal 7.0
while not seekEOF (inputdata) do