TOPIC
não sei oque tem de eraado
marcinha1235 asked 2 years ago
<?php
// Online IDE - Code Editor, Compiler, Interpreter $N = (int) fgets(STDIN);
for($i = 0; $i < $N; $i++) $X[] = (int)fgets(STDIN);
$menor = $X[0]; $pos = 0; for($i = 1; $i < $N; $i++){ if ($X[$i] < $menor){ $menor = $X[$i]; $pos = $i; } }
echo"Menor valor: $menor\n"; echo"Posicao: $pos\n";
This topic has not been answered yet. Be the first!