Dim $len,$m,$n,$i,$y,$x[$len],$y[$len+1],$s,$n
Func trasnform($m,$n)
if $m = '000000' Then
$an =StringSplit($m,"","0")
$len = StringLen($m)
$b = StringLeft("591591591591591",$len)
$bn = StringSplit($b,"","0")
For $i=1 To $len Step 1
Switch Asc($an[$i])
Case 97 To 122
$an[$i]=StringRight((Asc($an[$i])-97),1)
Case 65 To 90
$an[$i]=StringRight((Asc($an[$i])-65),1)
EndSwitch
; Next
;$s = 0
;For $i=1 To $len Step 1
$y[$i]=StringRight($an[$i]*$bn[$i],1)
$s = $s + Int($y[$i])
$n= StringRight($s,1)
next
EndIf
Return $n
MsgBox("0","",'$n')
endfunc
If $m ='G123456789' then
trasnform($m,$n)
MsgBox("0","",'$n')
exit
endif |