0

Find out greater of two number without using any comparsion in c?

5th Jun 2019, 8:05 AM
Sardar Badar Saghir
Sardar Badar Saghir - avatar
2 Respuestas
+ 3
You can try this (python) a=10 b=1 if a-b == b-a: print('equal') elif abs(a-b)==a-b: print('a bigger')
5th Jun 2019, 8:54 AM
Lothar
Lothar - avatar
+ 2
Use the follwoing expression : ((num1 + num2) + abs(num1 - num2)) / 2
5th Jun 2019, 8:37 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar