<?php
$vetor = [];
$menor = 0.0;
$indice = 0;
$ind_menor_ele = 0;

// Leitura dos 10 valores reais
for ($indice = 0; $indice < 10; $indice++) {
    fscanf(STDIN, "%f\n", $vetor[$indice]);
}

// Inicialização do menor elemento
$menor = $vetor[0];
$ind_menor_ele = 0;

// Busca pelo menor valor
for ($indice = 1; $indice < 10; $indice++) {
    if ($menor > $vetor[$indice]) {
        $menor = $vetor[$indice];
        $ind_menor_ele = $indice;
    }
}

// Exibe a posição do menor valor (índice + 1)
printf("%d", $ind_menor_ele + 1);
?>

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: