rendered paste body#include <fstream>#include <iomanip> using namespace std;int main( ) {ifstream rainbow; // input file streamofstream heights; // output file streamdouble distance, // Distance to rainbow (miles) heightMain, // Height of the main rainbow (miles) heightSecondary; // Height of the secondary rainbow (miles)rainbow.open("rainbow.dat");heights.open("heights.dat");heights.setf(ios::fixed, ios::floatfield);heights.setf(ios::showpoint);heights << "Lloyd Lashbaugh" << endl;heights << "Rainbow Heights (in miles)" << endl;heights << "\n" << endl;rainbow >> "Miles to rainbows:";rainbow.ignore(200, '\n'); // Skip to next line of inputheights << " Rainbow Secondary Distance" << endl;heights << "---------------------------------------------" << endl;