I have to find maximum of three number provided by user but with some restrictions. Its not allowed to use any conditional statement. I tried using ternary operator like bel
#include "stdafx.h" #include int main() { int x,y,z; scanf("%d %d %d", &x,&y, &z); int max = ((x+y) + abs(x-y)) /2; max = ((max+z) + abs(max-z)) /2; printf("%d ", max); return 0; }