I have a question which involves reading from cin and counting the number of words read until the end of file(eof).
The question is as follows:
Words are delimited by white spaces (blanks, tabs, linefeeds, returns). It will print 3 pieces of information
before exit: the first word, the last word, and the number of words read, with one blank in between fields.
Input
lines of words
Output
The first word, the last word, and the number of words read, with one blank in between fields.
Sample input
I like C++
It is easier than counting 1,2,3
Sample output
I 1,2,3 9
I am facing a major problem as i'm new to c++. Can anyone please help me... thanks soo much... i appreciate that...