var
a: integer;
begin
writeln('Введите целое число:');
readln(a);
if a < 0 then
writeln(a, '^2 = ', sqr(a));
if a > 0 then
writeln(a, '^3 = ', sqr(a) * a);
if a = 0 then
writeln('Равно нулю.');
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
a: integer;
begin
writeln('Введите целое число:');
readln(a);
if a < 0 then
writeln(a, '^2 = ', sqr(a));
if a > 0 then
writeln(a, '^3 = ', sqr(a) * a);
if a = 0 then
writeln('Равно нулю.');
end.