include stdio include stdlib define 100 int main void double sum max m

 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
26
#include <stdio.h>
#include <stdlib.h>
#define N 100
int main(void)
{
double M[N], sum, max, min;
int i;
printf ("Введите массив:\n");
for (i=0; i<N; i++)
scanf ("%lf", &M[i] );
max=M[1];
min=M[1];
for (i=0; i<N; i++)
if (M[i]>max)
max=M[i];
else
{
if(M[i]<min)
min=M[i];
}
sum=max+min;
printf ("%lf", sum);
system("PAUSE");
return 0;
}