
Burilhala
5 год назад
Составьте программу нахождения суммы двух наибольших из трех различных чисел.Pascal ABC.
ОТВЕТЫ

Бойка
Oct 24, 2020
program symma;
var a,b,c,s:integer;
begin
Readln(a,b,c);
if (a > b) and (c > b) then s:=a+c;
if (b > a) and (c>a) then s:=b+c;
if (a>b) and (b>c) then s:=a+b;
if (b>a) and (a>c) then s:=b+a;
Writeln(s)
end.
var a,b,c,s:integer;
begin
Readln(a,b,c);
if (a > b) and (c > b) then s:=a+c;
if (b > a) and (c>a) then s:=b+c;
if (a>b) and (b>c) then s:=a+b;
if (b>a) and (a>c) then s:=b+a;
Writeln(s)
end.
521
Смежные вопросы: