Special divisors: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add Modula-2) |
Not a robot (talk | contribs) (Add PILOT) |
||
Line 1,135: | Line 1,135: | ||
131 137 139 143 149 151 157 163 167 169 173 179 181 187 191 193 197 199 |
131 137 139 143 149 151 157 163 167 169 173 179 181 187 191 193 197 199 |
||
</pre> |
</pre> |
||
=={{header|PILOT}}== |
|||
<lang pilot>C :max=200 |
|||
:n=1 |
|||
*num |
|||
C :x=n |
|||
U :*rev |
|||
C :rn=r |
|||
:d=1 |
|||
*div |
|||
J (d*(n/d)<>n):*nextdiv |
|||
C :x=d |
|||
U :*rev |
|||
J (r*(rn/r)<>rn):*next |
|||
*nextdiv |
|||
C :d=d+1 |
|||
J (d<=n/2):*div |
|||
T :#n |
|||
*next |
|||
C :n=n+1 |
|||
J (n<max):*num |
|||
E : |
|||
*rev |
|||
C :r=0 |
|||
:a=x |
|||
*revloop |
|||
C :b=a/10 |
|||
:r=r+(a-b*10) |
|||
:a=b |
|||
J (a>0):*revloop |
|||
E :</lang> |
|||
{{out}} |
|||
<pre style='height:50ex;'>1 |
|||
2 |
|||
3 |
|||
4 |
|||
5 |
|||
6 |
|||
7 |
|||
8 |
|||
9 |
|||
11 |
|||
13 |
|||
17 |
|||
19 |
|||
22 |
|||
23 |
|||
26 |
|||
27 |
|||
29 |
|||
31 |
|||
33 |
|||
37 |
|||
39 |
|||
41 |
|||
43 |
|||
44 |
|||
46 |
|||
47 |
|||
53 |
|||
55 |
|||
59 |
|||
61 |
|||
62 |
|||
66 |
|||
67 |
|||
69 |
|||
71 |
|||
73 |
|||
77 |
|||
79 |
|||
81 |
|||
82 |
|||
83 |
|||
86 |
|||
88 |
|||
89 |
|||
93 |
|||
97 |
|||
99 |
|||
101 |
|||
103 |
|||
107 |
|||
109 |
|||
113 |
|||
121 |
|||
127 |
|||
131 |
|||
137 |
|||
139 |
|||
143 |
|||
149 |
|||
151 |
|||
157 |
|||
163 |
|||
167 |
|||
169 |
|||
173 |
|||
179 |
|||
181 |
|||
187 |
|||
191 |
|||
193 |
|||
197 |
|||
199</pre> |
|||
=={{header|PL/I}}== |
=={{header|PL/I}}== |