Răspuns:
Maximul dintre doua numere:
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a>b)
{
cout<<a;
}
else
{
cout<<b;
}
}
Maximul dintre 3 numere:
#include <iostream>
using namespace std;
int main()
{
int a,b,c,max;
cin>>a>>b>>c;
max=a;
if(b>max)
{
max=b;
}
if(c>max)
{
max=c;
}
cout<<max;
}