#include <stdio.h>
#include <stdlib.h>

int main() {
    int n;
    scanf("%d", &n);

    double *v;
    v = malloc(n * sizeof(double));

    if(v == NULL){
        printf("Memória insuficiente\n");
        exit(1);
    }
    
    for(int i = 0; i < n; i++){
        scanf("%lf", &v[i]);
    }
    
    double media = 0;
    for(int i; i < n; i++){
        media += v[i] / n;
    }
    
    printf("%.2lf", media);
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: