Descending primes: Difference between revisions

Content added Content deleted
No edit summary
Line 421: Line 421:
S:=S+Format('%12.0n', [I*1.0]);
S:=S+Format('%12.0n', [I*1.0]);
Inc(Cnt);
Inc(Cnt);
if (Cnt mod 10)=0 then
if (Cnt mod 8)=0 then
begin
begin
Memo.Lines.Add(S);
Memo.Lines.Add(S);
Line 431: Line 431:
Memo.Lines.Add('Descending Primes Found: '+IntToStr(Cnt));
Memo.Lines.Add('Descending Primes Found: '+IntToStr(Cnt));
end;
end;





Line 437: Line 436:
{{out}}
{{out}}
<pre>
<pre>
2 3 5 7 31 41 43 53 61 71
2 3 5 7 31 41 43 53
73 83 97 421 431 521 541 631 641 643
61 71 73 83 97 421 431 521
653 743 751 761 821 853 863 941 953 971
541 631 641 643 653 743 751 761
983 5,431 6,421 6,521 7,321 7,541 7,621 7,643 8,431 8,521
821 853 863 941 953 971 983 5,431
8,543 8,641 8,731 8,741 8,753 8,761 9,421 9,431 9,521 9,631
6,421 6,521 7,321 7,541 7,621 7,643 8,431 8,521
9,643 9,721 9,743 9,851 9,871 75,431 76,421 76,541 76,543 86,531
8,543 8,641 8,731 8,741 8,753 8,761 9,421 9,431
87,421 87,541 87,631 87,641 87,643 94,321 96,431 97,651 98,321 98,543
9,521 9,631 9,643 9,721 9,743 9,851 9,871 75,431
98,621 98,641 98,731 764,321 865,321 876,431 975,421 986,543 987,541 987,631
76,421 76,541 76,543 86,531 87,421 87,541 87,631 87,641
87,643 94,321 96,431 97,651 98,321 98,543 98,621 98,641
98,731 764,321 865,321 876,431 975,421 986,543 987,541 987,631
8,764,321 8,765,321 9,754,321 9,875,321 97,654,321 98,764,321 98,765,431
8,764,321 8,765,321 9,754,321 9,875,321 97,654,321 98,764,321 98,765,431
Descending Primes Found: 87
Descending Primes Found: 87

</pre>
</pre>



=={{header|F_Sharp|F#}}==
=={{header|F_Sharp|F#}}==