#include <iostream>
#include <string>
#include <cmath>

using namespace std;

void printMenu();
void addNumbers();
void subtractNumbers();
void multiplyNumbers();
void divideNumber();
void powerNumber();
void squareRootNumber();
void areaCircle();
void areaRectangle();
void areaTriangle();
void volumeCube();
void volumeSphere();
void volumeCylinder();
void checkEven0dd();
void checkPrime();
void findMax();
void findMin();
void reverseString();
void countVowels();

int main()
{
	int choice = -1;
	bool isRunning = true;

	while (isRunning)
	{
		printMenu();
		count << "Dwse tin epilogi sou:";

		cin >> choice;

		switch (choice)
		{
			case 1:
				addNumbers();
				break;
			case 2:
				subtractNumbers();
				break;
			case 3:
				multiplyNumbers();
				break;
			case 4:
				divideNumbers();
				break;
			case 5:
				powerNumber();
				break;
			case 6:
				squareRootNumber();
				break;
			case 7:
				areaCircle();
				break;
			case 8:
				areaRectangle();
				break;
			case 9:
				areaTriangle();
				break;
			case 10:
				volumeCube();
				break;
			case 11:
				volumeSphere();
				break;
			case 12:
				volumeCylinder();
				break;
			case 13:
				checkEven0dd();
				break;
			case 14:
				checkPrime();
				break;
			case 15:
				findMax();
				break;
			case 16:
				findMin();
				break;
			case 17:
				reverseString();
				break;
			case 18:
				countVowels();
				break;
			case 0:
				isRunning = false;
				break;
			default:
				cout << "Lathos epilogi. Prospathise xana." << endl;
				break;
		}
		cout << endl;
	}
	return 0;
}
void printMenu()
{
	cout << "=== KENTRIKO MENU ===" << endl;
	cout << "1. Prosthesi" << endl;
	cout << "2. Afairesi" << endl;
	cout << "3. Pollaplasiamos" << endl;
	cout << "4. Dairesi" << endl;
	cout << "5. Dimani" << endl;
	cout << "6. Tertagwniki Riza" << endl;
	cout << "7. Emvadon KiklOU" << endl;
	cout << "8. Emvadon Orthogwniou" << endl;
	cout << "9. Emvadon Trigwnou" << endl;
	cout << "10. Ogkos Kivou" << endl;
	cout << "11. Ogkos Sfairas" << endl;
	cout << "12. Ogkos Kilindrou" << endl;
	cout << "13. Elenxos Artiou - Perittou" << endl;
	cout << "14. Elengxos Prwtou Arithmou" << endl;
	cout << "15. Vres to Megisto" << endl;
	cout << "16. Vres to Elaxisto" << endl;
	cout << "17. Antistrofi Lexis" << endl;
	cout << "18. Katametrisi Fwnientwn" <<endl;
	cout << "0. Exodos" << endl;
	cout << "=====================" << endl;
}

void addNumbers()
{
	double a;
	double b;
	cout << "Dwse duo arithmous: ";
	cin >> a >> b;
	cout << "Apotelesma: " << (a + b) << endl;
}

void subtractNumbers()
{
	double a;
	double b;
	cout << " Dwse duo arithmous: ";
	cin >> a >> b;
	cout << "Apotelesma: " << (a - b) << endl;
}

void multiplyNumbers()
{
	double a;
	double b;
	cout << "Dwse duo arithmous: ";
	cin >> a >> b;
	cout << "Apotelesma: " << (a * b) << endl;
}

void divideNumbers()
{
	double a;
	double b;
	cout << "Dwse duo arithmous: ";
	cin >> a >> b;
	if (b != 0)
	{
		cout << "Apotelesma: " << ( a / b) << endl;
	}
	else
	{
		cout << "Sfalma: Dairesi me to miden." << endl;
	}
}

void powerNumber()
{
	double base;
	double exponent;
	cout << "Dwse vasi kai ektheti: ";
	cin >> base >> exponent;
	cout << "Apotelesma: " << pow(base, exponent) << endl;
}

void squareRootNumber()
{
	double num;
	cout << "Dwse aritmo: ";
	cin >> num;
	if (num >= 0)
	{
		Cout <<"Apotelesma: " << sqrt(num) << endl;
	}
	else
	{
		cout << "Sfalma: Arnhtikos arithmos." << endl;
	}
}

void areaCircle()
{
	double radius;
	const double PI = 3.14159265;
	cout << "Dwse aktina: ";
	cin >> "Emvadon: " << (PI * radius * radius) << endl;
}

void areaRectangle()
{
	 double length;
	 double width;
	 cout << "dwse mikos kai platos: ";
	 cin >> Length >> width;
	 cout << "Emvadon: " << (length * width) << endl;
}

void areaTrianlge()
{
	double base;
	double height;
	cout << "Dwse vasi kai ypsos: ";
	cin >> base >> height;
	cout << "Emvadon: " << (0.5 * base * height) << endl;
}

void volumeCube()
{
	double side;
	cout << "Dwse plevra kivou: ";
	cin >> side;
	cout << "Ogkos: " << (side * side * side) << endl;
}

void volumeSphere()
{
	double radius;
	const double PI + 3.14159265;
	cout << "Dwse aktina sfairas: ";
	cin >> radius;
	cout << "Ogkos: " << (4.0 / 3.0 * PI * radius * radius * radius) << endl;
}

void volumeCylinder()
{
	double radius;
	double height;
	const double PI = 3.14159265;
	cout << "Dwse aktina kai ypsos kilindrou: ";
	cin >> radius >> height;
	cout << "Ogkos: " << (PI * radius * radius * height) << endl;
}


