@asics
Freelance
2853 / 1788 / 144
Регистрация: 09.09.2010
Сообщений: 3,841
|
05.12.2010, 15:49
|
|
А если так
C | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| #include <stdio.h>
float get_cpedn_aref(int N)
{
int sum = 0, n;
for(int i = 0; i < N; ++i)
{
printf("\n\t%d. -> ", i);
scanf("%d", &n);
sum += n;
}
return sum / N;
}
int main()
{
int N = 0, *arr;
printf("Enter N: \n\t-> ");
scanf("%d", &N);
printf("\nCpednee apefmetu4eckoe: \n\t %f", get_cpedn_aref(N));
return 0;
} |
|
1
|