Last active
June 9, 2019 23:02
-
-
Save flaviors200/242eee93e717c2827805e69182ed2007 to your computer and use it in GitHub Desktop.
Loop statements: do-while
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
<?php | |
$attempts = 1; | |
do { | |
$coinFlip = random_int(0,1); // 0 testa 1 croce | |
echo "Lancio n. $attempts: $coinFlip\n"; | |
$attempts--; | |
} while ($attempts < 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment