Strange unique prime triplets: Difference between revisions

m
→‎{{header|ALGOL W}}: Minor comment and case changes
(Added Algol W)
m (→‎{{header|ALGOL W}}: Minor comment and case changes)
Line 209:
% construct a sieve of primes up to MAX_PRIME * 3 %
Eratosthenes( p, MAX_PRIME * 3 );
% count the nicestrange prime triplets whose members are less than< 1000 and %
% andwhose sum is prime the first 30 %
sCount := c30 := 0;
% 2 cannot be one of the primes as the sum would be even otherwise %
Line 217:
for m := n + 2 step 2 until MAX_PRIME - 3 do begin
if p( m ) then begin
for l := m + 2 STEPstep 2 until MAX_PRIME do begin
if p( l ) then begin
integer s;
3,030

edits