This is what I have so far and I can't figure out how to get the converted length in my output file so that 312 inches converts to 3 yards, 1 foot, and 3 inches.
#include <iostream.h>
#include <fstream.h>
using namespace std;
int main()
{
ofstream outfile;
int centimeters;
int inches;
int yards;
int feet;
outfile.open("lengthout.txt");
cout << "Enter length in centimeters: ";
cin >> centimeters;
cout << endl;
cout << "The number entered was " << centimeters
<< " for centimeters. " << endl;
inches = centimeters * 0.3937;
outfile << "Program #3 Output by " << endl;
outfile << "Input Length in centimeters: " << centimeters << endl;
outfile << "Length in inches: " << inches << endl;
outfile << "Converted length: "
return 0;
}