Sub SayiOku(strSayi)
If Len(Trim(strSayi)) = 0 Then Exit Sub
arrBirler = Array(0, "bir" , "iki" , "üç" , "dört" , "beş" , "altı" , "yedi" , "sekiz" , "dokuz" )
arrOnlar = Array(0, "on" , "yirmi" , "otuz" , "kırk" , "elli" , "altmış" , "yetmiş" , "seksen" , "doksan" )
arrBuyukler = Array("" , "birler" , "onlar" , "yüz" , "bin" , "bir" , "iki" , "milyon" , "bir" , "iki" , "milyar" , "bir" , "iki" , "trilyon" , "bir" , "iki" )
iBasamak = Len(strSayi)
If CInt(Left(strSayi, 1)) = 0 Then
Call SayiOku(Right(strSayi, iBasamak-1))
ElseIf arrBuyukler(iBasamak) = "birler" Then
If NOT strSayi = 0 Then strYazi = arrBirler(CInt(strSayi))
Response.Write strYazi
ElseIf arrBuyukler(iBasamak) = "onlar" Then
strYazi = arrOnlar(CInt(Left(strSayi, 1))) & arrBirler(CInt(Right(strSayi, 1)))
Response.Write strYazi
ElseIf arrBuyukler(iBasamak) = "bir" Then
strYazi = arrOnlar(CInt(Left(strSayi, 1)))
If CInt(Mid(strSayi, 2, 1)) = 0 Then strYazi = strYazi & arrBuyukler(iBasamak-1)
Response.Write strYazi
Call SayiOku(Right(strSayi, iBasamak-1))
ElseIf arrBuyukler(iBasamak) = "iki" Then
strYazi = arrBirler(Left(strSayi, 1)) & "yüz"
strYazi = Replace(strYazi, "biryüz" , "yüz" )
If CInt(Mid(strSayi, 2, 1)) = 0 Then strYazi = strYazi & arrBuyukler(iBasamak-2)
Response.Write strYazi
Call SayiOku(Right(strSayi, iBasamak-1))
Else
strYazi = arrBirler(Left(strSayi, 1)) & arrBuyukler(iBasamak)
strYazi = Replace(strYazi, "biryüz" , "yüz" )
Response.Write strYazi
Call SayiOku(Right(strSayi, iBasamak-1))
End If
End Sub
Call SayiOku(Request.QueryString("Sayi" ))