Piprimes: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) m (→{{header|C}}: fix my own typo) |
Not a robot (talk | contribs) (Add FOCAL) |
||
Line 177: | Line 177: | ||
{{out}}<pre> |
{{out}}<pre> |
||
0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10 11 11 11 11 11 11 12 12 12 12 13 13 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 18 18 18 18 18 18 19 19 19 19 20 20 21 21 21 21 21 21</pre> |
0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10 11 11 11 11 11 11 12 12 12 12 13 13 14 14 14 14 15 15 15 15 15 15 16 16 16 16 16 16 17 17 18 18 18 18 18 18 19 19 19 19 20 20 21 21 21 21 21 21</pre> |
||
=={{header|FOCAL}}== |
|||
<lang FOCAL>01.10 S C=0 |
|||
01.20 S N=1 |
|||
01.30 T %3,C |
|||
01.40 S N=N+1 |
|||
01.50 D 2;S C=C+A |
|||
01.60 I (C-22)1.3 |
|||
01.70 T ! |
|||
01.80 Q |
|||
02.10 S I=1 |
|||
02.20 S I=I+1 |
|||
02.30 I (I*I-N-1)2.4;S A=1;R |
|||
02.40 S A=N/I |
|||
02.50 I (FITR(A)-A)2.2;S A=0</lang> |
|||
{{out}} |
|||
<pre>= 0= 1= 2= 2= 3= 3= 4= 4= 4= 4= 5= 5= 6= 6= 6= 6 |
|||
= 7= 7= 8= 8= 8= 8= 9= 9= 9= 9= 9= 9= 10= 10= 11= 11 |
|||
= 11= 11= 11= 11= 12= 12= 12= 12= 13= 13= 14= 14= 14= 14= 15= 15 |
|||
= 15= 15= 15= 15= 16= 16= 16= 16= 16= 16= 17= 17= 18= 18= 18= 18 |
|||
= 18= 18= 19= 19= 19= 19= 20= 20= 21= 21= 21= 21= 21= 21</pre> |
|||
=={{header|J}}== |
=={{header|J}}== |