A natural number is entered. Determine if it is a perfect square. Pascal

program zz1;

var i: real; // set a variable of non-integer type

n: integer; // set a variable of integer type


write (‘enter the given number n’); // enter a natural number from the keyboard

read (n);

i: = sqrt (n); // extract the square root of the given number

if frac (i) = 0 // check if the resulting fractional part is equal to zero, then

then writeln (‘Is’) // print one answer

else writeln (‘is not’); // print another answer


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.