All pastes #923007 Raw Edit

C++

public text v1 · immutable
#923007 ·published 2008-02-29 04:29 UTC
rendered paste body
//Author: Olasile Fasugba
//Source: amusementpark.cpp
//Description: Amusement Park Project 
//Compiler used: Visual Studio 2005 Express Edition

#include <iostream>
using namespace std;
int main()
{
	int children1, youth1, adults1;
	double total1, total2, total3, grandtotal;

	cout << "Fanzone Amusement Park\n";
	cout << "\n";
	cout << "Enter the number of Children tickets: " << endl;
	cin >> children1;
	cout << "Enter the number of Youth tickets: " <<endl;
	cin >> youth1;
	cout << "Enter the number of Adult tickets: " <<endl;
	cin >> adults1;

	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
	cout.precision(2);

	total1 = children1 * 2.00;
	total2 = youth1 * 8.50;
	total3 = adults1 * 12.50;
	grandtotal = (children1 * 2.00) + (youth1 * 8.50) + (adults1 * 12.50);

	cout << "\n";
	cout << "\tFanzone Amusement Park\n";
	cout << "\n";
	cout << "\t\tTickets\tPrice\tTotal\n";
	cout <<"\n";
	cout << "Children\t" << children1 << "\t2.00\t" << total1 << endl;
	cout << "Youth\t\t" << youth1 << "\t8.50\t" << total2 << endl;
	cout << "Adults\t\t" << adults1 << "\t12.50\t" << total3 << endl;
	cout <<"\n";
	cout << "\t\tTotal Bill\t" << grandtotal << endl;
	cout <<"\n";
	system("pause");

	return 0;
}