when i run this code and enter 5 5 5, why wont this code give the maximum number for the code as shown below
#include<iostream>
using namespace std;
int main()
{int x1,x2,x3;
cin>>x1>>x2>>x3;
if(x1>x2)
if(x1>x3)
cout<<x1;
else
cout<<x3;
if(x2>x3)
if(x2>x1)
cout<<x2;
else
cout<<x3;
}
Last edited on
Please don't double post. ^^ I answered the other one.