/* Write File program */

#include <iostream.h>
#include <fstream.h>
#include <lvpstring.h>

using namespace std;	// October 5, 2001

int main()
{
	ofstream OutFile("my-data.txt");
	if (OutFile.fail()) {
		cout << "File could not be opened";
		return(0);
	}
	else {
		OutFile << "The first line of the file." << endl;
		OutFile << (12 + 34) << endl;
		OutFile << "PI=";
		OutFile.setf(ios::fixed);
		OutFile.precision(2);
		double PI=3.1415926;
		OutFile.width(10); OutFile << PI << endl;
		OutFile << "The last line of the file.";
		return(0);
	}
}

