Three sequences X , Y , Z of n real numbers each are given ( n < 200 ). Calculate the value of (а,a) - (b,c) , where a denotes that of the sequences X , Y , Z , which has the largest minimal element, and b and c denote two other sequences.
I don’t understand what is (a,a) - (b,c) , so for the beginning I decided to write a program that she would simply choose a .
The question is: how to make an array with the largest minimal element be taken as a ?
My code is:
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<conio.h> #include<locale.h> #define n 200 void main() { setlocale(LC_CTYPE, "Russian"); float X[n], Y[n], Z[n]; int k, i, j, l; printf("введите k \n"); scanf("%d", &k); { printf("\n Введите значения массива X\n"); for (i = 0; i < k; i++) scanf("%f", &X[i]); int min = X[0]; for (i = 1; i < k; i++) if (X[i] < min) min = X[i]; printf("\n Минимальный элемент массива X: %d", min); } { printf("\n Введите значения массива Y\n"); for (j = 0; j < k; j++) scanf("%f", &Y[j]); int min2 = Y[0]; for (j = 1; j < k; j++) if (Y[j] < min2) min2 = Y[j]; printf("\n Минимальный элемент массива Y: %d", min2); } { printf("\n Введите значения массива Z\n"); for (l = 0; l < k; l++) scanf("%f", &Z[l]); int min3 = Z[0]; for (l = 1; l < k; l++) if (Z[l] < min3) min3 = X[l]; printf("\n Минимальный элемент %d", min3); } _getch(); }