#include <stdio.h>
#include <stdlib.h>
int main() {
double media, sum = 0;
int n;
scanf("%d", &n);
int *p;
p = malloc(n * sizeof(int));
for(int i = 0; i < n; i++){
scanf("%d", &p[i]);
sum += p[i];
}
media = sum / n;
printf("%.2f", media);
free(p);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: