Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reading and writing and using format statements.

Reading and writing and using format statements.

Reading and writing and using format statements.

Hi guys, I'm stuck on a question which i could use some help on, i tried a code but it does not work properly. I have the data below in a separate text file. The question is as follow:

In an experiment, the forces N/m2
were measured at different location. At each location there
were six readings of forces. Each force has it
s weighting factor. The experimental data were stored in following format.
F1 F2 F3 F4 F5 F6 Average
20 10 30 20 15 5
Point1 52.8 57.9 45.8 41.2 46.2 76.7
Point2 45.8 57.3 41.2 43.7 47.5 55.6
Point3 3.6 35.0 20.6 28.5 14.8 73.8
Point4 29.3 57.8 32.6 13.3 57.5 61.2
Point5 64.3 53.8 69.3 41.8 57.1 53.2
Point6 45.5 50.6 63.0 47.7 46.5 56.8
Point7 67.9 48.0 56.9 52.9 18.8 47.3
Point8 63.5 41.3 45.5 64.5 57.6 63.1
Point9 68.1 41.6 53.8 45.7 34.7 43.8
Point10 6.3 63.4 55.1 62.0 18.5 42.6
Write a program to:
Read the relevant data from an input file (D
ata.txt) with appropriate format statements
in the table above.
Calculate the average force at each point ta
king into account the weighting factors of
various forces.
Write back to the table file including th
e average force column into a new file
(results.txt) using the same
format as task one.


RE: Reading and writing and using format statements.

If you want to help then post what have you done so far.
This is an help forum, not a free coding service and your question looks like a homework.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close