Search found 1 match

by Lekva
Fri Jan 03, 2003 9:54 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 61298

583

:cry: [pascal]
var
code,c:integer;
j,i,n:longint;
s:string;

function prime(n:longint):boolean;
begin
prime:=true;
for j:=2 to trunc(sqrt(n)) do
if n mod j=0 then
begin
prime:=false;
exit;
end;
if c=1 then
write(' x ');
write(n);
end;

procedure rec(n:longint);
begin
inc(i);
while ...

Go to advanced search