fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. float alunos[5];
  5. float soma = 0;
  6. for (int i = 0; i < 5; i++) {
  7. scanf("%f", &alunos[i]);
  8. soma += alunos[i];
  9. }
  10. float media = soma / 5;
  11. for (int i = 0; i < 5; i++) if (alunos[i] >= media) printf("%.2f\n", alunos[i]);
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/508521/101
Success #stdin #stdout 0s 5408KB
stdin
1
2
3
4
5
stdout
3.00
4.00
5.00