help!! how to read and store words from file input?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charlz
    New Member
    • Mar 2007
    • 2

    help!! how to read and store words from file input?

    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......
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    post the code you have written so far indicating where you are having problems

    Comment

    • charlz
      New Member
      • Mar 2007
      • 2

      #3
      actually, i dont know how to start solving the problem although i have an idea how... can u help me on this one?

      Comment

      • DeMan
        Top Contributor
        • Nov 2006
        • 1799

        #4
        Sure we'll help, but perhaps if you share your idea on how, someone may be able to suggest whether that would be a good start, or whether there might be a better idea we have....

        Comment

        Working...