Skip to content

Instantly share code, notes, and snippets.

@jeffersonchaves
Created June 13, 2021 17:36
Show Gist options
  • Save jeffersonchaves/a6daac05cadd90f8ebfe2cfcd534f310 to your computer and use it in GitHub Desktop.
Save jeffersonchaves/a6daac05cadd90f8ebfe2cfcd534f310 to your computer and use it in GitHub Desktop.
<?php
$numeros;
$lista = [10];
for ($i = 0; $i < 10; $i++) {
print "($i) Dgite um numero inteiro: ";
$numeros = (float) fgets(STDIN);
$lista[$i] = $numeros;
}
print "\n";
for ($i = 9; $i >= 0; $i--) {
print "($i) " . $lista[$i] . "\n";
}
//print_r(array_reverse($lista));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment