#include <stdio.h>
#include <stdlib.h>
typedef struct Atleta {
float notas[5];
} atleta;
void receberNotas(atleta* l) {
for(int i = 0; i < 5; i++) {
printf("Digite %d nota: ", (i
+ 1)); scanf("%f", &l
->notas
[i
]); }
}
void mostrarNotas(atleta *l) {
for(int i = 0; i < 5; i++) {
printf("\n%.2f", l
->notas
[i
]); }
}
int main() {
atleta
*a
= malloc(sizeof(atleta
)); receberNotas(a);
mostrarNotas(a);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnR5cGVkZWYgc3RydWN0IEF0bGV0YSB7CiAgICBmbG9hdCBub3Rhc1s1XTsKfSBhdGxldGE7CnZvaWQgcmVjZWJlck5vdGFzKGF0bGV0YSogbCkgewogICAgZm9yKGludCBpID0gMDsgaSA8IDU7IGkrKykgewogICAgICAgIHByaW50ZigiRGlnaXRlICVkIG5vdGE6ICIsIChpICsgMSkpOwogICAgICAgIHNjYW5mKCIlZiIsICZsLT5ub3Rhc1tpXSk7CiAgICB9Cn0Kdm9pZCBtb3N0cmFyTm90YXMoYXRsZXRhICpsKSB7CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgNTsgaSsrKSB7CiAgICAgICAgcHJpbnRmKCJcbiUuMmYiLCBsLT5ub3Rhc1tpXSk7CiAgICB9Cn0KaW50IG1haW4oKSB7CiAgICBhdGxldGEgKmEgPSBtYWxsb2Moc2l6ZW9mKGF0bGV0YSkpOwogICAgcmVjZWJlck5vdGFzKGEpOwogICAgbW9zdHJhck5vdGFzKGEpOwp9