Skip to content

Instantly share code, notes, and snippets.

@yutopp
Created October 30, 2012 15:18
Show Gist options
  • Save yutopp/3980879 to your computer and use it in GitHub Desktop.
Save yutopp/3980879 to your computer and use it in GitHub Desktop.
何やってんじゃ・・・
#runtime "hsp3cl"
ERUTASO = "えい", "びー", "しー", "でぃー", "いー", "えふ", "じー", "えいち", "あい", "じぇー", "けー", "える", "えむ", "えぬ", "おー", "ぴー", "きゅー", "あーる", "えす", "てぃー", "ゆー", "ぶい", "だぶりゅう", "えっくす", "わい", "ぜっと"
kanji = "", "一", "ニ", "三", "四", "五", "六", "七", "八", "九"
unit_n = 1000, 100, 10, 1
unit = "千", "百", "十", ""
goto *@f
#defcfunc to_kanji int prm_num, local num
num = prm_num
if ( num > ( unit_n( 0 ) * 10 - 1 ) ) : return "N"
s = ""
foreach unit_n
if ( num / unit_n( cnt ) > 0 ) {
if ( num / unit_n( cnt ) > 1 || unit_n( cnt ) == 1 ) { s += kanji( num / unit_n( cnt ) ) }
s += unit( cnt )
num \= unit_n( cnt )
}
loop
return s
*@
chitanda = 0
repeat 1000
mes to_kanji( cnt + 1 ) + "反田" + ERUTASO( chitanda )
chitanda++
if ( chitanda == length( ERUTASO ) ) : chitanda = 0
loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment