include stdio include stdlib int main int double sum printf Vvedite ko

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <stdlib.h>
int main()
{
int k=1,i,N;
double sum=0,a;
printf("Vvedite kolichestvo chisel N\n");
scanf("%d",&N);
for(i=1;i<=N;i++,k++)
{
printf("Vvedite chislo %d\n",k);
scanf("%lf",&a);
sum+=a;
}
sum=sum/N;
printf("Sredne arifmitichskoe ravno= %.lf\n",sum);
system("PAUSE");
return 0;
}