Find the square of the sum and the sum of squares of 2 integers entered from the keyboard. Through the pascal.

program zz1;
var a, b, s, r: integer; // set variables of integer type
begin
write (‘enter the first number’); // enter the first number from the keyboard
read (a);
write (‘enter the second number’); // enter the second number from the keyboard
read (b);
s: = sqr (a + b); // calculate the square of the sum of the numbers
r: = sqr (a) + sqr (b); // calculate the sum of the squares of the numbers

writeln (‘the square of the sum of numbers =’, s); // print the first answer and go to a new line
writeln (‘sum of squares of numbers =’, r); // print the second answer

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.