Senin, 24 Mei 2010

program mencari bilangan prima

uses crt;
var
a,b,c,d : integer;
begin
clrscr;

for a := 1 to 17 do
begin
if 2 mod a = 0 then

write(' ',a)

else
if a mod 2 = 1 then

write(' ',a)
else
if 2 mod a = a then
write(' ',a)

end;
readln;

end.
end.

Tidak ada komentar:

Posting Komentar