Write a program in Pascal. Determine if the number entered from the keyboard is prime.

var n: integer; otvet: real; prostoe: boolean;
begin
writeln (‘Enter n:’);
readln (n);
prostoe: = true;
for var i: = 2 to n-1 do if n mod i = 0 then
begin
writeln (n, ‘Not prime, divisible by’, i);
prostoe: = false;
exit;
end;
if prostoe then writeln (n, ‘Simple’);
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.