Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main()
  6. {
  7. int n, i, a, srednia;
  8. n=0;
  9. double w = 0.0;
  10. while(a!=0)
  11. {
  12. printf("Podaj liczbe: ");
  13. scanf("%d", &a);
  14. w=w+a;
  15. n=n+1;
  16. }
  17. printf("wynik:%lf", w/n);
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement