473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

1
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
Mar 19 '08 #1
2 1009
gpraghuram
1,275 Expert 1GB
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
Mar 19 '08 #2
Ganon11
3,652 Expert 2GB
What's Chapter 3? Maybe you should try reading it...and the rest of the text that has been assigned.
Mar 19 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing...
6
by: JW | last post by:
I'm displaying product thumbnails with brief descriptions on web pages. Clicking on the product does a javascript popup with larger image and detailed description info passed to the javascript...
3
by: Oliver Bryant | last post by:
I just finished developing a javascipt component allowing floating captions to appear over HTML elements. If anyone wants to check it out you can see specs and download it from...
5
by: greg | last post by:
I'm sure this is easy - if someone could give me a push in the right direction I would apprieciate it! If you have multiple categories CatID - NAME - ParentID 1 root 0 2 ...
36
by: No Spam | last post by:
Dear fellow Access 2003 Users, Is there a way to trim all of the fields in a table in one swoop using VBA (preferred) or a query? Right now, I am using an update query and updating EACH field...
0
by: eric | last post by:
I am working on a project that needs to have a scrollable display area. In this area I want to put text and a bar graph. I have looked at all of the tutorials I can find and can "paint" onto a...
6
by: Rob Bolton | last post by:
Hi there, If a program running under the interactive logon session (say Susan), needs to impersonate Bob (via "LogonUser()"), but Bob needs to access the network as Susan (i.e., his local...
2
by: Steve N. | last post by:
In converting a console app to windows, I'd like to emulate the console (stdout) output into a textbox. I am wondering how I can easily translate the c style format strings into .NET format...
12
by: john_sips_tea | last post by:
I've got a fairly substantial webapp written in Java (plus Tomcat, Hibernate, Struts, JSP, MySQL) that is a bit of a bear to work with. I didn't write it. Much of it is only very sparsely...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.