#include <stdio.h>
#define MAX 3
float menor_nota(float valor[MAX]) {
int i;
float menor = valor[0];
for (i = 1; i < MAX; i++) {
if (valor[i] < menor) {
menor = valor[i];
}
}
return menor;
}
int main() {
int i;
float notas[MAX];
printf("Informe a nota dos 30 alunos: ");
for (i = 0; i < MAX; i++) {
}
printf("\n A menor nota foi: %2.2f", menor_nota
(notas
)); }
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgTUFYIDMKZmxvYXQgbWVub3Jfbm90YShmbG9hdCB2YWxvcltNQVhdKSB7CglpbnQgaTsKCWZsb2F0IG1lbm9yID0gdmFsb3JbMF07Cglmb3IgKGkgPSAxOyBpIDwgTUFYOyBpKyspIHsKCSAgICBpZiAodmFsb3JbaV0gPCBtZW5vcikgewoJICAgICAgICBtZW5vciA9IHZhbG9yW2ldOwoJICAgIH0KCX0KCXJldHVybiBtZW5vcjsKIH0KCmludCBtYWluKCkgewogICAgaW50IGk7CiAgICBmbG9hdCBub3Rhc1tNQVhdOwoKICAgIHByaW50ZigiSW5mb3JtZSBhIG5vdGEgZG9zIDMwIGFsdW5vczogIik7CgoJZm9yIChpID0gMDsgaSA8IE1BWDsgaSsrKSB7CgkgICAgc2NhbmYoIiVmIiwgJm5vdGFzW2ldKTsKCX0KCXByaW50ZigiXG4gQSBtZW5vciBub3RhIGZvaTogJTIuMmYiLCBtZW5vcl9ub3RhKG5vdGFzKSk7Cn0=