1234567891011121314151617 |
- #include <stdio.h>
- int main() {
- int n, i;
- scanf("%d", &n);
-
- double salary[n], sum = 0.0;
-
- for(i = 0; i < n; i++) scanf("%lf", &salary[i]);
- for(i = 0; i < n; i++) sum += salary[i];
-
- double average = sum / n;
-
- printf("%.2lf", average);
-
- return 0;
- }
|