Fairly easy problem I'm sure, but I'm new to C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Solais
    New Member
    • Mar 2008
    • 1

    Fairly easy problem I'm sure, but I'm new to C++

    Write a program that inputs integers from a text file and outputs them to a text file. In the input file, the integers are listed one per line. In the output file, the integers should be listed 8 per line.
    The input file is “numbers.txt”. Name the output file using your last name. You do not have to use functions for this program. Output files are discussed in Chapter 3. Use % and a counter to control the number of values per line in the output.

    Thanks
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by Solais
    Write a program that inputs integers from a text file and outputs them to a text file. In the input file, the integers are listed one per line. In the output file, the integers should be listed 8 per line.
    The input file is “numbers.txt”. Name the output file using your last name. You do not have to use functions for this program. Output files are discussed in Chapter 3. Use % and a counter to control the number of values per line in the output.

    Thanks

    As you say its fairly easy.
    But what have you tried from your end?
    What logic you have in mind or what have u written to solve this?

    Raghuram

    Comment

    • Ganon11
      Recognized Expert Specialist
      • Oct 2006
      • 3651

      #3
      What's Chapter 3? Maybe you should try reading it...and the rest of the text that has been assigned.

      Comment

      Working...