#include<iostream>
usingnamespace std;
int max(int num1, int num2)
{
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}
int main()
{
int num1, num2;
cout << "Enter your first number: ";
cin >> num1;
cout << "Enter your second number:";
cin >> num2;
if (num1 > num2)
cout << num1 << " is greater than " << num2 << endl;
return 0;
}
#include<iostream>
usingnamespace std;
int max(int num1, int num2)
{
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}
int main()
{
int num1, num2;
cout << "Enter your first number: ";
cin >> num1;
cout << "Enter your second number:";
cin >> num2;
cout<<"The larger number is "<<max(num1,num2)<<endl;
return 0;
}