Hackerss.com

Hackerss.com is a community of amazing hackers

Hackerss is a community for developers, data scientitst, ethical hackers, hardware enthusiasts or any person that want to learn / share their knowledge of any aspect of digital technology.

Create account Log in
hackerss
hackerss

Posted on

Php Imprimir si un numero es non


function isNon($number) {
  if ($number % 2 == 0) {
    echo "El numero es par";
  } else {
    echo "El numero es impar";
  }
}

//example
isNon(2); //El numero es par
isNon(3); //El numero es impar


Enter fullscreen mode Exit fullscreen mode

Top comments (0)