Reading data file and calculations

This is a discussion on Reading data file and calculations within the C++ Programming forums, part of the General Programming Boards category; Hi Could anyone please give me with the c / C++ source code for the following problem: There are 2 ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    4

    Reading data file and calculations

    Hi

    Could anyone please give me with the c / C++ source code for the following problem:

    There are 2 notepad files -

    1st file has unsorted data: I need to get the value present in the 10th line from the top and in the 7th colum

    e.g. 2.098 3.789 7.677 3.456 5.666 6.7 7000

    2nd File has sorted data in 4 columns and about 1000 rows

    I need to find the mean and standard deviation of the values in the 3 column of the 2nd file. Then I want to add the value taken from the first file to this mean. Finally i want to write the Mean, Standard deviation & the Sum to another notepad file in 3 columns.

    I know this it not too complicated but I really don't know file hanadling in c++.

    Please do ask me if you find some amboguity in this problem.

    Cheers

    Joe

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Quote Originally Posted by testingcw View Post
    Please do ask me if you find some amboguity in this problem.

    Cheers

    Joe
    Yeah... I really have a question for you - have you read the homework policy before posting?

    Write a program, post your code - ask question if you have problems or errors - this is how it works here
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    Do a search for fstream on the forum search.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Doing calculations on a data file
    By bassist11 in forum C Programming
    Replies: 2
    Last Post: 03-30-2009, 08:47 PM
  2. Trouble Reading Data from Files
    By CConfusion in forum C Programming
    Replies: 11
    Last Post: 04-06-2006, 08:12 PM
  3. reading in file data
    By sickofc in forum C Programming
    Replies: 2
    Last Post: 03-01-2006, 05:16 PM
  4. reading a columns input data file
    By vk13wp in forum C Programming
    Replies: 6
    Last Post: 04-28-2003, 02:32 PM
  5. Reading from a file quickly
    By PJYelton in forum C++ Programming
    Replies: 5
    Last Post: 10-11-2002, 02:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21