Amicable pairs: Difference between revisions
Content deleted Content added
Line 332:
comment - main program begins here;
integer a, b, c, found;
outstring(1,"Searching up to 20000 for amicable pairs\n");
found := 0;
for a := 2 step 1 until 20000 do
begin
Line 342 ⟶ 343:
if a = c then
begin
found := found + 1;
outinteger(1,a);
outinteger(1,b);
Line 348 ⟶ 350:
end;
end;
outinteger(1,found);
outstring(1,"
end
Line 363 ⟶ 366:
12285 14595
17296 18416
8 pairs were found
</pre>
|