You are on page 1of 3

// train ticket booth

#include <iostream>
#include <string>
using namespace std;
int main()
{
int destination_input = 0;
int bogie_type = 0;
cout << " ***** Choose your destination ***** " << endl;
cout << " Enter 1 for Rawalpindi to Peshawar " << endl;
cout << " Enter 2 for Rawalpindi to Lahore " << endl;
cout << " Enter 3 for Rawalpindi to Quetta " << endl;
cout << " Enter 4 for Rawalpindi to Karachi " << endl;
cin >> destination_input;
if (destination_input == 1)
{
(cout << "***** Rawalpindi to Peshawar ***** " << endl);
(cout << "Enter 1 for Excutive class" << endl);
(cout << "Enter 2 for Lower A/C" << endl);
(cout << "Enter 3 for Economy" << endl);
(cin >> bogie_type);
if (bogie_type == 1)
{
(cout << "Price is 1000 + 15% tax" << endl);
(cout << "Your total price including tax is " << 1000 * 1.15 <<
endl);
}
if (bogie_type == 2)
{
(cout << "Price is 700 + 15% tax" << endl);
(cout << "Your total price including tax is " << 700 * 1.15 <<
endl);
}
if (bogie_type == 3)
{
(cout << "Price is 500 + 15% tax" << endl);
(cout << "Your total price including tax is " << 500 * 1.15 <<
endl);
}
}
if (destination_input == 2)
{
(cout << "***** Rawalpindi to Lahore ***** " << endl);
(cout << "Enter 1 for Excutive class" << endl);
(cout << "Enter 2 for Lower A/C" << endl);
(cout << "Enter 3 for Economy class" << endl);
(cin >> bogie_type);
if (bogie_type == 1)
{
(cout << "Price is 1200 + 15% tax" << endl);
(cout << "Your total price including tax is " << 1200 * 1.15 <<
endl);
}
if (bogie_type == 2)
{
(cout << "Price is 720 + 15% tax" << endl);
(cout << "Your total price including tax is " << 720 * 1.15 <<
endl);
}
if (bogie_type == 3)
{
(cout << "Price is 500 + 15% tax" << endl);
(cout << "Your total price including tax is " << 500 * 1.15 <<
endl);
}

}
if (destination_input == 3)
{
(cout << "***** Rawalpindi to Quetta ***** " << endl);
(cout << "Enter 1 for First class sleeper" << endl);
(cout << "Enter 2 for Economysleeper" << endl);
(cin >> bogie_type);
if (bogie_type == 1)
{
(cout << "Price is 6100 + 15% tax" << endl);
(cout << "Your total price including tax is " << 6100 * 1.15 <<
endl);
}
if (bogie_type == 2)
{
(cout << "Price is 2000 + 15% tax" << endl);
(cout << "Your total price including tax is " << 2000 * 1.15 <<
endl);
}

}
if (destination_input == 4)
{
(cout << " ***** Rawalpindi to Karachi ***** " << endl);
(cout << "Enter 1 for Executive Class" << endl);
(cout << "Enter 2 for Lower A/C" << endl);
(cout << "Enter 3 for Economy" << endl);
(cout << "Enter 4 for First Class Sleeper" << endl);
(cout << "Enter 5 for Economy Sleeper" << endl);
(cin >> bogie_type);
if (bogie_type == 1)
{
(cout << "Price is 8000 + 15% tax" << endl);
(cout << "Your total price including tax is " << 8000 * 1.15 <<
endl);
}
if (bogie_type == 2)
{
(cout << "Price is 6500 + 15% tax" << endl);
(cout << "Your total price including tax is " << 6500 * 1.15 <<
endl);
}
if (bogie_type == 3)
{
(cout << "Price is 1550 + 15% tax" << endl);
(cout << "Your total price including tax is " << 1550 * 1.15 <<
endl);
}
if (bogie_type == 4)
{
(cout << "Price is 5500 + 15% tax" << endl);
(cout << "Your total price including tax is " << 5500 * 1.15 <<
endl);
}
if (bogie_type == 5)
{
(cout << "Price is 1800 + 15% tax" << endl);
(cout << "Your total price including tax is " << 1800 * 1.15 <<
endl);
}

}
else
cout << "You enterd the wrong input"
}

You might also like