although multiplication operator is not allowed..
but it's an attempt to write shorter...

c++ implementation-

int cond(int x, int y, int z){
     return  y*(int)((bool)x)+z*(1+(~(int)((bool)x)+1));
}

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/5uGBGvacNEwJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to