#include #include using namespace std; int main( ) { ifstream rainbow; // input file stream ofstream heights; // output file stream double 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 << endl; rainbow >> "Miles to rainbows:"; rainbow.ignore(200, '\n'); // Skip to next line of input heights << " Rainbow Secondary Distance" << endl; heights << "---------------------------------------------" << endl;