Teddy D

Generation

translateTue, 31 Jan 2023

only get the numbers

<?php $num = trim(fgets(STDIN)); if ($num % 2 == 0) { echo "even\n"; } else { echo "odd\n"; }

Questions about programming?Chat with your personal AI assistant