fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. printf ("Podaj liczbe naturalna n:\n");
  6. int n,i=0;
  7. scanf ("%d", &n);
  8. float a, suma=0;
  9.  
  10. while (i<n) {
  11. scanf ("%f", &a);
  12. suma=a+suma;
  13. i++;
  14. }
  15.  
  16. printf ("Srednia arytmetyczna tych liczb wynosi %f", suma/n);
  17.  
  18. return 0;
  19. }
Time limit exceeded #stdin #stdout 5s 2296KB
stdin
Standard input is empty
stdout
Standard output is empty