mardi 29 mars 2016

Implement if-else using the following operators: +, -, *, :, minimum and maximum only

My system has the ability to use the operators: +,-,*,:,min(x,y) and max(x,y).

I need your help with implementing using these operators only if-else sentence.

for example:

if(t<5){
do somthing
}
will be:
min(max(t-5,0),0)
comment: where 0 - is true and 1 - is false.

Thank you.

Aucun commentaire:

Enregistrer un commentaire