program PrimeNumber;
varnumber, i, count: integer;
beginwriteln('Enter a number: ');readln(number);
count := 0;
for i := 2 to number div 2 dobeginif number mod i = 0 thencount := count + 1;end;
if count = 0 thenwriteln('Yes, the number is prime.')elsewriteln('No, the number is not prime.');end.
program PrimeNumber;
var
number, i, count: integer;
begin
writeln('Enter a number: ');
readln(number);
count := 0;
for i := 2 to number div 2 do
begin
if number mod i = 0 then
count := count + 1;
end;
if count = 0 then
writeln('Yes, the number is prime.')
else
writeln('No, the number is not prime.');
end.