So i wanted to write a code that would take 3 user inputs and return the biggest one in a string sentence. I am following a tutorial, but got a bit ahead of myself. Any help apprecieted. Also i only get 1 as output.
Here is the code:
#include <iostream>
using namespace std;
int getmax(int num_1, int num_2, int num_3){
int MAX;
if(num_1 > num_2 && num_3){
MAX = num_1;
} else if(num_2 > num_1 && num_3){
MAX = num_2;
} else if(num_3 > num_2 && num_3){
MAX = num_3;
}
return MAX;
}
int main()
{
int num_1;
cout << "Player one, enter your name...";
cin >> num_1;
int num_2;
cout << "Player two, enter your name...";
cin >> num_2;
int num_3;
cout << "Player three, enter your name...";
cin >> num_3;
cout << getmax;
return 0;
}