anonymous
  • anonymous
am trying to write a c++ program that does the following: 1.reads five decimal numbers into a file "input.txt" 2.writes the five numbers from the file into an ouput file "output.txt" 3. calculates the sum of the five decimal numbers. 4. calculates the average of the five decimal numbers. 5. writes the sum and average into the file "output.txt" help this extremely urgent....i can do the calculations its just the i/o stuff,
Mathematics
schrodinger
  • schrodinger
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
Lol wrong section - this is mathematics.... but ill help a bit anyway. Before I start, do you know for sure the file format is in decimals?
anonymous
  • anonymous
and are you not worried about finding the wrong file oir anything?
anonymous
  • anonymous
but if I were you, I'd do something along the lines of string name; // get file name ifstream ifs(name.c_str()); // do stuff (get ints out, do operations) string oname; ofstream ofs(oname.c_str(); // put ints in

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
thanks but am even more confused..

Looking for something else?

Not the answer you are looking for? Search for more explanations.