Ответ:
program a1;
Var
a,b,c,max,min:integer;
Begin
Readln(a,b,c);
if (a = b) or (a = c) or (b = c) or ((a = b) and (b = c)) then
writeln('Ошибка, числа должны быть разными');
if (a>b) and (a>c) then max:=a;
if (b>a) and (b>c) then max:=b;
if (c>a) and (c>b) then max:=c;
if (a<b) and (a<c) then min:=a;
if (b<a) and (b<c) then min:=b;
if (c<a) and (c<b) then min:=c;
Writeln('Max:', max, ' Min:', min);
write('Среднее арифметическое:',(a+b+c)/3);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
program a1;
Var
a,b,c,max,min:integer;
Begin
Readln(a,b,c);
if (a = b) or (a = c) or (b = c) or ((a = b) and (b = c)) then
writeln('Ошибка, числа должны быть разными');
if (a>b) and (a>c) then max:=a;
if (b>a) and (b>c) then max:=b;
if (c>a) and (c>b) then max:=c;
if (a<b) and (a<c) then min:=a;
if (b<a) and (b<c) then min:=b;
if (c<a) and (c<b) then min:=c;
Writeln('Max:', max, ' Min:', min);
write('Среднее арифметическое:',(a+b+c)/3);
end.