Write a program in Pascal for the problem: Enter the numbers a and b, and print the squares

Write a program in Pascal for the problem: Enter the numbers a and b, and print the squares and cubes of integers from a to b. (Using loops)

1)
program square_cube; // with a for loop
var a, b: integer;
begin
writeln (‘enter two numbers with a space’);
readln (a, b);
for i: integer: = a to b do writeln (power (i, 2): 8, power (i, 3): 8)
end.

2)
program square_cube1; // with a while loop
var a, b: integer;
begin
writeln (‘enter two numbers with a space’);
readln (a, b);
while (a <b) or (a = b) do
begin
writeln (power (a, 2): 8, power (a, 3): 8);
a: = a + 1;
end
end.

3)
program square_cube2; // with a repeat loop
var a, b: integer;
begin
writeln (‘enter two numbers with a space’);
readln (a, b);
repeat
writeln (power (a, 2): 8, power (a, 3): 8);
a: = a + 1;
until a = b + 1;
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.