Question: Please help me write a runing program File Input/Output in C++ Winclude //header file for file I/o ifstream inFile: file ofstream outFile: (names of your

 Please help me write a runing program File Input/Output in C++

Please help me write a runing program

File Input/Output in C++ Winclude //header file for file I/o ifstream inFile: file ofstream outFile: (names of your choice) //declare input and output stream variables /I0pen the input fi with input file stream variable) inFile.open ("h: Idoublevalue.txt") //open non-existent output file or existing output file. outFile . open ("h:Wnea rest int . txt", le (associate file name and location append new output to ios : : app o use input file stream variable inFile (instead of never input is from a file and not from the /* (Now cin) whe keyboard. Examples are: inFile > value; inFile.get (ch) : inFile.ignore 25, '' getline (inFile, str) Use the outp cout) to output strings of text and variable values to the output file.) //Close input and output inFile.close() outFile.close) files Lab Assignment: Write a program to convert floating point to the nearest integer using file input and output. The output should identify both the input value and the rounded value, in a sentence. The input file must exist, with the data in it, before you run the program. Run once with input data value of 243.78. Then open the input file and change the data in it to an input data value of 94.375. After you run the program again, the output file should contain the results of both runs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!