mardi 31 octobre 2017

Looking for an equivalent function without use if statement

I’ve this function

int f(int x) {
  if (x == 0)
    return 0;
  return 1;
}

Is possible to write an equivalent function without use the if statement?

Aucun commentaire:

Enregistrer un commentaire