Twin primes by yt

procedure gnat.io.a is
p:integer;begin
for i in 3..1999 loop
for j in 2..i-1 loop
if i rem j=0 then goto c;end if;end loop;if i-p=2 then
put(p);put(',');put(i);new_line;end if;p:=i;<<c>>null;end loop;end;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page