Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int n, i, a, srednia;
- n=0;
- double w = 0.0;
- while(a!=0)
- {
- printf("Podaj liczbe: ");
- scanf("%d", &a);
- w=w+a;
- n=n+1;
- }
- printf("wynik:%lf", w/n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement