Odds and Evens

  • Create a file, that contains the following line:
    2 3 5 6 8 10 12 13 14 15 19 23 24 39
    Be sure to end the line with a return (newline character). Call this file EvensAndOdds.txt.
  • Write a program named EvenAndOdd.cpp that reads the EvensAndOdds.txt file and writes out two new files. The new files will be called Evens.txt and Odds.txt. The file named Evens.txt will contain the even numbers from the EvensAndOdds.txt file and the file named Odds.txt will contain the odd numbers from the EvensAndOdds.txt file.