Answer to Question #295024 in C++ for III

Question #295024


// Write a program that copies the data in the

// prelab input file to an output file "88_mph"

// so that it is formatted the same in both files.

// Additionally add 50 to the year when you rewrite

// it to the output file to help Marty Mcfly get back to

// his proper time.

#include <iostream>

#include <fstream>

using namespace std;

int main() {

   // ADD HERE declare variables

   

   // declare input file stream variable and open file

   ifstream fin;

   fin.open("prelab_input.txt");

 

   if (!fin) {

     cout << "ERROR - File failed to open. make sure that " << "the input file and this file are in the"

       << "same directory" << endl;

     return -1;

    

   }

   // declare output file stream varaible and open file

   ofstream fout;

   fout.open("88_mph.txt");

   // ADD HERE write your code here

 

   // closing files

   fin.close();

   fout.close();

   return 0;

}


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

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