Created
January 20, 2015 12:09
-
-
Save AndreaBarghigiani/a6e364333604874a23ec to your computer and use it in GitHub Desktop.
Esercizio funzione conto_alla_rovescia()
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 | |
//Manca proprio tutta la definizione della funzione | |
function conto_alla_rovescia( $int ){ | |
$int = intval($int); //Mi assicuro che sia un intero | |
$m = $int; //Mi creo una variabile per contare i passi | |
for( $i = 0; $i < $m; $i++ ){ | |
echo $int-- . "<br />"; | |
} | |
} | |
conto_alla_rovescia( 13 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment