/*

Magic Calculator
by Eric O'Callaghan (eric@ericoc.com)

The most pathetic piece of code you'll ever see.

*/

#include <iostream>
using namespace std;

int main ()
{

	// Variables
	int first, op, second, result;

	// Say hi
	cout << "\nWelcome to the mAgiC cAlCulAtoR!\n";
	cout << "This calculator is special because you have to enter a special number for the operation.\n";
	cout << "1 - addition, 2 - subtraction, 3 - multiplcation, 4 - division\n";

	// Ask for first number
	cout << "\nEnter first number\n";
	cin >> first;

	// Ask for operation
	cout << "\nEnter the operation\n";
	cin >> op;

	// Ask for second number
	cout << "\nEnter second number\n";
	cin >> second;

	// Get result depending on operation
	switch (op) {
	case 1:
		result = first + second;
	break;
	case 2:
		result = first - second;
	break;
	case 3:
		result = first * second;
	break;
	case 4:
		result = first / second;
	break;
	}

	// Tell the result
	cout << "\nThe answer is:\n";
	cout << result;
	cout << "\n";
}

