Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<cstdlib>
- #include<cstdio>
- int main()
- {int n,s=0;
- scanf("%d",&n);
- int A[n];
- float d;
- for(int i=0;i<n;i++)
- scanf("%d",&A[i]);
- for(int i=0;i<n;i++)
- {
- s=s+A[i];}
- d=s/n;
- printf("%.1f",d);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement