Проверено на Паскале АВС:
Program byalodenis;
uses crt;
const n=10;
var
e:array[1..n] of integer;
min,max,i: integer;
begin
writeln('*** alphaues is thinking... ***');
writeln('*** OK ***');
writeln();
writeln('Элементы массива:');
randomize;
e[1]:=random(100)-50;
write (e[1]:5);
max:=e[1];
min:=e[1];
for i:=2 to n do
begin
e[i]:=random(100)-50;
write (e[i]:5);
if e[i]>max then
max:=e[i];
if e[i]<min then
min:=e[i];
end;
writeln();
writeln('Сумма максимального и минимального элементов равна ',max+min);
end.
using namespace std;
int main()
{
double a,b,c,d;
cout << "Enter 1st-triangle catheti here: " << endl;
cin >> a >> b;
cout << "Enter 2nd-triangle catheti here: " << endl;
cin >> c >> d;
bool podobie = ((a/c == b/d) || (a/d == b/c));
cout << boolalpha;
cout << podobie;
cin.get();
cin.get();
return 0;
}