SEDOLs: Difference between revisions

(Added AppleScript.)
Line 3,531:
'585284'.
'B0YBKT' } do: [ :c | (sedol checked: c) displayNl ]</lang>
 
{{works with|Smalltalk/X}}
<lang smalltalk>#(
'710889'
'B0YBKJ'
'406566'
'B0YBLH'
'228276'
'B0YBKL'
'557910'
'B0YBKR'
'585284'
'B0YBKT'
'B00030'
) collect:[:in |
|um check|
 
sum := 0.
(in to:6) with:#[1 3 1 7 3 9 ] do:[:ch :weight |
sum := sum + (ch digitValue * weight).
].
check := (10 - (sum%10)) % 10.
Transcript showCR: ( in,(Character digitValue:check))
].</lang>
{{out}}
7108899
B0YBKJ7
4065663
B0YBLH2
2282765
B0YBKL9
5579107
B0YBKR5
5852842
B0YBKT7
B000300
 
=={{header|SQL PL}}==
Anonymous user