Last active
November 23, 2022 16:47
-
-
Save massihm/e6b200affcf222b9df84cc002436fd88 to your computer and use it in GitHub Desktop.
isOdd PhpFunctionGenerator for Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Output "Function isOdd(`$int){" > ".\code.php"; | |
for($i=0;$i-lt10000;$i+=2){ | |
Write-Output " if(`$int == $i) return false;" >> ".\code.php"; | |
Write-Output " if(`$int == $($i+1)) return true;" >> ".\code.php"; | |
} | |
Write-Output "}" >> ".\code.php"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment