// Find the largest number out of 3 numbers.
// Date 21:50 10/10/2016
// By Ben a.k.a DreamVB

#include <iostream>

using namespace std;
using std::cout;
using std::endl;
using std::cin;

int MaxOutOfThree(int a, int b, int c){

	//Check if a > b and a > c
	if ((a > b) && (a > c)){
		return a;
	}

	//Check if b > a and b > c
	else
	{
		if ((b > a) && (b > c)){
			return b;
		}
		//Check if c > a and c > b
		else{
			if ((c >a) && (c > b)){
				return c;
			}
		}
	}
}

int main(int argc, char *argv[]){

	int a = 0;
	int b = 0;
	int c = 0;
	int max = 0;

	cout << "Enter 3 numbers : ";
	cin >> a; cin >> b; cin >> c;

	//Extract largest number.
	max = MaxOutOfThree(a, b, c);
	//Print out largest num
	cout << max << " was the largest number" << endl;

	system("pause");
	return 0;
}