All pastes #166455 Raw Edit

Mine

public cpp v1 · immutable
·published 2006-09-10 22:42 UTC
rendered paste body
#include <iostream>#include <iomanip>#include <fstream>using namespace std;int main(){	// Declare variables to hold ticket data	int price, tickets, sales, x;	// Declare file stream variables	ifstream fIn;	ofstream fOut;	// Open input/output files	fIn.open("F:\\ticket-sales\\tickets.txt");	fOut.open("F:\\ticket-sales\\output.txt");	// Grab input from the file	for (int x = 0; x < 4;) {		x++;		fIn >> price >> tickets;		sales = price * tickets;	}	// Set required output formatting	cout << fixed << showpoint << setprecision(2) << endl;		fOut << "Price: " << price << ", Tickets: " << tickets << ", Sales: " << sales << endl;	fIn.close();	fOut.close();	return 0;}