473,499 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Manipulation in C++ ... a little help

6 New Member
Hey guys , is there anybody who can give me a program to this problem.

1. Write a program to create a file called grades.dat. Each line of the file should contain a last name and four scores. Use a sentinel to stop input.

2. Assume the file you created contains the following data:

Smith 80 90 80 90
Jones 70 80 70 80
Reed 95 90 95 90
Kirl 100 90 100 90

Write a program to read each record. Compute the average of the four scores for each person and print to the screen the last name and average.
Apr 9 '07 #1
3 1359
RedSon
5,000 Recognized Expert Expert
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

Then when you are ready post a new question in this thread.

MODERATOR
Apr 9 '07 #2
angeldeveloper
6 New Member
A little help guys...

1. Write a program to create a file called grades.dat. Each line of the file should contain a last name and four scores. Use a sentinel to stop input.

2. Assume the file you created contains the following data:

Smith 80 90 80 90
Jones 70 80 70 80
Reed 95 90 95 90
Kirl 100 90 100 90

Write a program to read each record. Compute the average of the four scores for each person and print to the screen the last name and average.
Apr 9 '07 #3
RedSon
5,000 Recognized Expert Expert
Double posting is against site rules. Please do not do it again. This thread will be merged with the other one that you already started.
Apr 9 '07 #4

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

Similar topics

10
9077
by: J. Campbell | last post by:
OK...I'm in the process of learning C++. In my old (non-portable) programming days, I made use of binary files a lot...not worrying about endian issues. I'm starting to understand why C++ makes...
1
1324
by: Greg Lindstrom | last post by:
I have an odd problem that I'm sure someone here can help me solve. I am using Python 2.3 on a Linux box to process text files. At one point in my automated process, I have to zip and ship the...
22
4940
by: fniles | last post by:
I have a .CSV file (comma delimited) that I want to open using OLEDB, but I get the error "External table is not in the expected format." If I save the .CSV file to an .XLS file, I can open the...
1
2060
by: scubber | last post by:
hi, im new (as you're going to painfully aware of in a minute) to programming and was wondering if anyone could help with this little problem: i am trying to read a number of values which are...
0
2562
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market...
0
2335
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases...
5
1887
by: Andrew Hedges | last post by:
Wherein I attempt to debunk some myths about the relative merits of the two methods for programmatically adding content to a web page: ...
4
7213
by: BibI | last post by:
Hi there, I just started programming with PERL and am trying to put together my first little data manipulation program. I am working on a MAC with OSX. I have a data file with the following...
15
17348
by: pakerly | last post by:
How would i do this, convert a test file to excel? Lets say my text file has fields like this: NUMBER NAME ADDRESS PHONE 11002 Test1 ...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.