Greatest of Two Numbers Without Using A Relational Operator
- by ratty
I want to find the greater of two numbers without using < > this relational operator.
I tried this
int a,b;
if(a/b==0)
{
b is greater
}
else
{
a is greater
}
but this not working for negative numbers.