Program srednee;
var
a, b, c:integer;
sa:real;
begin
write ('Введите а='); readln (a);
write ('Введите b='); readln (b);
write ('Введите c='); readln (c);
if (a mod 5 = 0) and (b mod 5 <> 0) and (c mod 5 = 0) then
begin
a:= sqr(a); writeln ('Квадрат а=', a);
b:= sqr(b); writeln ('Квадрат b=', b);
c:= sqr(c); writeln ('Квадрат c=', c);
end else begin
if (a mod 5 <> 0) and (b mod 5 = 0) and (c mod 5 <> 0) then
begin
a:= a+10; writeln ('а+10=', a);
b:= b+10; writeln ('b+10=', b);
c:= c+10; writeln ('c+10=', c);
end else begin
sa:=(a+b+c)/3;
write ('Среднее арифметическое =', sa);
end
end
end.