3 numbers are given. Square those of them whose values are negative. (write a program in Pascal).

program zz1;
var a, b, c: integer; // introduce 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);
write (‘enter the third number’); // enter the third number from the keyboard
read (c);
if a <0 then a: = sqr (a); // check the entered numbers for negativity
if b <0 then b: = sqr (b);
if c <0 then c: = sqr (c);

// display the answer
write (‘received numbers’, a, ”, b, ”, c);
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.