Special divisors: Difference between revisions

m (Thundergnat moved page Special Divisors to Special divisors: capitalization policy)
Line 1,937:
72 such numbers found.
</pre>
=={{header|Yabasic}}==
{{trans|BASIC}}
<lang Yabasic>// Rosetta Code problem: http://rosettacode.org/wiki/Special_divisors
// by Galileo, 04/2022
 
20 FOR I=1 TO 199
30 J=I: X=0
40 IF J>0 X=X*10+MOD(J, 10): J=INT(J/10): GOTO 40
50 FOR J=1 TO INT(I/2)
60 IF MOD(I, J) GOTO 100
70 K=J: Y=0
80 IF K>0 Y=Y*10+MOD(K, 10): K=INT(K/10): GOTO 80
90 IF MOD(X, Y) GOTO 120
100 NEXT J
110 PRINT I,
120 NEXT I</lang>
{{out}}
<pre>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 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 ---Program done, press RETURN---</pre>
 
=={{header|Zig}}==
<lang zig>const MAX = 200; // max number to check
672

edits