The challenge is:
- If n is odd, print "Weird".
- If n is even and in the inclusive range of 2 to 5, print "Not Weird".
- If n is even and in the inclusive range of 6 to 20, print "Weird".
- If n is even and greater than 20, print "Not Weird".
And My Code is:
<?php
$N=5;
if($N%2==0 && $N>20){
echo "Not Weird";
}else{
echo "Weird";
}
?>
And the problem is:
When I rut it locally it's okay. But when I submit it to HackerRank then it fails their test when comes to $N=5;
case. Do I have any problems in my conditional according to the challenge?