Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Newbie
 
Join Date: Mar 2008
Posts: 1
#1: Mar 19 '08
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's Avatar
Expert
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,258
#2: Mar 19 '08

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


Quote:

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
Ganon11's Avatar
Moderator
 
Join Date: Oct 2006
Location: New York, United States of America
Posts: 3,428
#3: Mar 19 '08

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


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