rendered paste body#include <fstream>#include <iomanip> // For setprecision()using namespace std;int main( ) {ifstream rainbow; // input file streamofstream height; // output file streamdouble distance, // Distance of rainbowheightMain, // 1st Rainbow's heightheightSecondary; // Shadow's heightrainbow.open("rainbow.dat");heights.open("heights.dat");heights.setf(ios::fixed, ios::floatfield);heights.setf(ios::showpoint);heights << "Larry Titus" << endl; //*** substitute your own name ***heights << "Rainbow Heights (in miles)" << endl << endl;heights << endl;rainbow.ignore(200, '\n'); // Skip to next line of input.heights << " Rainbow Secondary Distance" << endl;heights << "---------------------------------------------" << endl;