//Описание добавить не вышло на сайт, посему - в файле
#include "stdafx.h" #include <conio.h>
void swap(short &a, short &b) { short c = a; a = b;
b = c; }
void sort(short &a, short &b, short &c) { short min = a, max = c; if (min > b) min = b; if (min > c) min = c; if (max < a) max = a; if (max < b) max = b; b = a + b + c - min - max; a = min; c = max; }
if ((a1 == a2) && (b1 == b2) && (c1 == c2)) printf("Boxes are equal"); else if ((a1 <= a2) && (b1 <= b2) && (c1 <= c2)) printf_s("The first box is smaller than the second one"); else if ((a2 <= a1) && (b2 <= b1) && (c2 <= c1)) printf_s("The first box is larger than the second one"); else printf_s("Boxes are incomparable");
begin
var a:=ArrRandom(30,-5,50); a.Println;
Writeln('k=',a.Where(x->x<0).Count)
end.
Тестовое решение:
24 39 36 2 -3 -3 29 32 24 -3 11 14 17 -4 -1 13 13 36 24 49 41 27 17 20 24 32 36 -2 -1 7
k=7