Answer to Question #210586 in C++ for dremo

Question #210586

Write a program that takes input from rawdata1.txt and writes a neat list of output to the screen

and to neat1.txt. Formatting instructions are used to create a neater layout: Numbers are written

one per line in a field width of 10. Each number is written with 3 digits after the decimal point.

Each number is written with a plus or minus sign. Write a function make_neat1 to format the

following text Uses “ 2345.45667 -0.0000456 34.9999 0.006788 -1 234


1
Expert's answer
2021-06-25T05:22:34-0400
#include <iostream>
#include <fstream>
#include <string>
using namespace std;


int main () {
    ifstream fr("rawdata1.txt");
    ofstream fn("neat1.txt");
  string text;
  while (getline (fr, text)) {
    fn << text;
  }


    fr.close();
    fn.close();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS