• outData << fixed << showpoint; // Set up floating-pt.
•
// output format
• // Open the files
•
• inData.open("cone.dat");
• outData.open("results.dat");
•
• // Get data
•
• inData >> htInInches >> diamInInches >>
redPrice
• >> bluePrice >>
greenPrice;
•
• // Convert dimensions to feet
•
• heightInFt = htInInches / INCHES_PER_FT;
• diamInFt = diamInInches / INCHES_PER_FT;
• radius = diamInFt / 2.0;