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