Find all natural numbers a, b, c, from the interval from 1 to 10 for which the equality a ^ 2 + b ^ 2 = c ^ 2

We use a loop with a for counter and the if … then … else construction, which defines the conditions under which the statement is executed.

program abc;
var a, b, c: integer;
begin
for a: = 1 to 10 do
for b: = 1 to 10 do
for c: = 1 to 10 do
begin
if a * a + b * b = c * c then
writeln (a: 3, b: 3, c: 3);
end;
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.