<?php
function parOuImpar($n){
    if ($n % 2 == 0) {
        echo "\nO número digitado é par.\n";
    }
    else {
        echo "\nO número digitado é ímpar.\n";
    }
}
parOuImpar(intval(trim(fgets(STDIN))));
?>

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: