#include <stdio.h>
#include <stdlib.h>
#define MAX 3
float menor_nota(float * valor) {
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
= malloc(sizeof(float) * 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+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2RlZmluZSBNQVggMwpmbG9hdCBtZW5vcl9ub3RhKGZsb2F0ICogdmFsb3IpIHsKCWludCBpOwoJZmxvYXQgbWVub3IgPSB2YWxvclswXTsKCWZvciAoaSA9IDE7IGkgPCBNQVg7IGkrKykgewoJICAgIGlmICh2YWxvcltpXSA8IG1lbm9yKSB7CgkgICAgICAgIG1lbm9yID0gdmFsb3JbaV07CgkgICAgfQoJfQoJcmV0dXJuIG1lbm9yOwogfQoKaW50IG1haW4oKSB7CiAgICBpbnQgaTsKICAgIGZsb2F0ICogbm90YXMgPSBtYWxsb2Moc2l6ZW9mKGZsb2F0KSAqIE1BWCk7CgogICAgcHJpbnRmKCJJbmZvcm1lIGEgbm90YSBkb3MgMzAgYWx1bm9zOiAiKTsKCglmb3IgKGkgPSAwOyBpIDwgTUFYOyBpKyspIHsKCSAgICBzY2FuZigiJWYiLCAmbm90YXNbaV0pOwoJfQoJcHJpbnRmKCJcbiBBIG1lbm9yIG5vdGEgZm9pOiAlMi4yZiIsIG1lbm9yX25vdGEobm90YXMpKTsKfQ==