#include <stdio.h>
float gmax, gmin;
void privet(float a, float b, float c, float d) {
float x[4], max, min;
x[0] = a;
x[1] = b;
x[2] = c;
x[3] = d;
max = a;
min = a;
for (int i = 0; i < 4; i++) {
if (max <= x[i])
max = x[i];
else if (min >= x[i])
min = x[i];
}
gmax = max;
gmin = min;
int main()
{
float c1, c2, c3, c4;
scanf("%f%f%f%f", &c1, &c2, &c3, &c4);
privet(c1, c2, c3, c4);
printf("Max:%f\nMin:%f", gmax, gmin);
return 0;
#include <stdio.h>
float gmax, gmin;
void privet(float a, float b, float c, float d) {
float x[4], max, min;
x[0] = a;
x[1] = b;
x[2] = c;
x[3] = d;
max = a;
min = a;
for (int i = 0; i < 4; i++) {
if (max <= x[i])
max = x[i];
else if (min >= x[i])
min = x[i];
}
gmax = max;
gmin = min;
}
int main()
{
float c1, c2, c3, c4;
scanf("%f%f%f%f", &c1, &c2, &c3, &c4);
privet(c1, c2, c3, c4);
printf("Max:%f\nMin:%f", gmax, gmin);
return 0;
}