im been having difficuties in reading and storing from an input file. the problem goes like this:
Write a program that reads in a whole bunch of words from all file (each word is no more than 20 characters) and spit out the duplicate words. For our purposes, words are to be separated by spaces, commas (,), !, ?, and periods (.). There can be an arbitrary amount of duplicate words. All comparisons should ignore case. Output the duplicate words, one per line, in lower case and in sorted order. Output should be put in a file
Sample Input:
How much wood would a woodchuck chuck if a woodchuck could chuck wood? Well? what do you think? Are you feeling well?
Sample Output:
a
chuck
well
wood
woodchuck
you
can you help me solve this......
Write a program that reads in a whole bunch of words from all file (each word is no more than 20 characters) and spit out the duplicate words. For our purposes, words are to be separated by spaces, commas (,), !, ?, and periods (.). There can be an arbitrary amount of duplicate words. All comparisons should ignore case. Output the duplicate words, one per line, in lower case and in sorted order. Output should be put in a file
Sample Input:
How much wood would a woodchuck chuck if a woodchuck could chuck wood? Well? what do you think? Are you feeling well?
Sample Output:
a
chuck
well
wood
woodchuck
you
can you help me solve this......
Comment