0
I’m having trouble doing the following exercise, someone with R knowledge could help in this case
In a long jump competition each athlete is entitled to five jumps. The result of the athlete will be determined by the average of the five remaining values. You must make a program that receives the name and the five distances reached by the athlete in its jumps and then enter the name, the jumps and the average of the jumps. The program must be closed when the name of the athlete is not given. The output of the program must follow the example below:
Atleta: Rodrigo Curvêllo
1 Salto: 6.5
2 Salto: 6.1
3 Salto: 6.2
4 Salto: 5.4
5 Salto: 5.3
Final result:
Atleta: Rodrigo Curvêllo
Saltos: 6.5 - 6.1 - 6.2 - 5.4 - 5.3
Média dos saltos: 5.9 m
I made it that far
while(TRUE){
atletas[1,1] <- readline(prompt = "digite o nome do atleta: ")
if(atletas == '') {
break
}
if (atletas != '')
for (i in 2:6)
{
atletas[1,i] <- readline(prompt = "digite o salto: ")
}
}