function jsConvertNumberToHangul( varNum )
{
// 리턴할 문자열
var returnStr = "" ;
// 음수일 때는 에러
if ( eval(varNum) < 0 ) {
return returnStr ;
}
// 넘어온 숫자를 문자로 변환
var numLen = varNum.length ;
// 변환된 문자를 앞에서 부터 한자씩 잘라서 보관할 변수
var oneChar = null ;
var isDone1 = true ;
var isDone2 = true ;
var isDone3 = true ;
var isDone4 = true ;
var isDone5 = false ;
for ( var inx = 0 ; inx < numLen ; inx++ ) {
oneChar = varNum.substring( inx, inx+1 ) ;
isDone5 = false ;
if ( oneChar == "0" ) {
// 아무일도 안함
} else if ( oneChar == "1" ) {
returnStr = returnStr + "일" ;
isDone5 = true ;
} else if ( oneChar == "2" ) {
returnStr = returnStr + "이" ;
isDone5 = true ;
} else if ( oneChar == "3" ) {
returnStr = returnStr + "삼" ;
isDone5 = true ;
} else if ( oneChar == "4" ) {
returnStr = returnStr + "사" ;
isDone5 = true ;
} else if ( oneChar == "5" ) {
returnStr = returnStr + "오" ;
isDone5 = true ;
} else if ( oneChar == "6" ) {
returnStr = returnStr + "육" ;
isDone5 = true ;
} else if ( oneChar == "7" ) {
returnStr = returnStr + "칠" ;
isDone5 = true ;
} else if ( oneChar == "8" ) {
returnStr = returnStr + "팔" ;
isDone5 = true ;
} else if ( oneChar == "9" ) {
returnStr = returnStr + "구" ;
isDone5 = true ;
}
if ( ((numLen-inx) % 4) == 0 && oneChar != "0" ) {
returnStr = returnStr + "천" ;
} else if ( ((numLen-inx) % 4) == 3 && oneChar != "0" ) {
returnStr = returnStr + "백" ;
} else if ( ((numLen-inx) % 4) == 2 && oneChar != "0" ) {
returnStr = returnStr + "십" ;
} else if ( ((numLen-inx) % 4) == 1 ) {
if ( numLen >= 17 && isDone1 && isDone5 ) {
returnStr = returnStr + "경" ;
isDone1 = false ;
} else if ( numLen >= 13 && isDone2 && isDone5 ) {
returnStr = returnStr + "조" ;
isDone2 = false ;
} else if ( numLen >= 9 && isDone3 && isDone5 ) {
returnStr = returnStr + "억" ;
isDone3 = false ;
} else if ( numLen >= 5 && isDone4 && isDone5 ) {
returnStr = returnStr + "만" ;
isDone4 = false ;
}
}
}
return returnStr ;
}
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 375 | ||
| 7829 |
|
9년 전 | 551 | |
| 7828 | 9년 전 | 486 | ||
| 7827 | 9년 전 | 372 | ||
| 7826 | 9년 전 | 380 | ||
| 7825 | 9년 전 | 434 | ||
| 7824 | 9년 전 | 416 | ||
| 7823 | 9년 전 | 321 | ||
| 7822 | 9년 전 | 315 | ||
| 7821 | 9년 전 | 262 | ||
| 7820 | 9년 전 | 316 | ||
| 7819 |
|
9년 전 | 718 | |
| 7818 | 10년 전 | 335 | ||
| 7817 | 10년 전 | 452 | ||
| 7816 | 10년 전 | 355 | ||
| 7815 | 10년 전 | 560 | ||
| 7814 | 10년 전 | 382 | ||
| 7813 | 10년 전 | 321 | ||
| 7812 | 10년 전 | 343 | ||
| 7811 | 10년 전 | 361 | ||
| 7810 | 10년 전 | 491 | ||
| 7809 | 10년 전 | 433 | ||
| 7808 | 10년 전 | 294 | ||
| 7807 | 10년 전 | 355 | ||
| 7806 |
프로그래머7
|
10년 전 | 1307 | |
| 7805 | 10년 전 | 1217 | ||
| 7804 |
zahir1312
|
10년 전 | 742 | |
| 7803 |
|
10년 전 | 1343 | |
| 7802 | 10년 전 | 400 | ||
| 7801 | 10년 전 | 827 | ||
| 7800 | 10년 전 | 1045 | ||
| 7799 | 10년 전 | 503 | ||
| 7798 | 10년 전 | 450 | ||
| 7797 | 10년 전 | 450 | ||
| 7796 | 10년 전 | 301 | ||
| 7795 | 10년 전 | 454 | ||
| 7794 | 10년 전 | 477 | ||
| 7793 | 10년 전 | 997 | ||
| 7792 | 10년 전 | 405 | ||
| 7791 | 10년 전 | 489 | ||
| 7790 | 10년 전 | 453 | ||
| 7789 |
fbastore
|
10년 전 | 1401 | |
| 7788 | 10년 전 | 484 | ||
| 7787 | 10년 전 | 351 | ||
| 7786 | 10년 전 | 503 | ||
| 7785 | 10년 전 | 521 | ||
| 7784 | 10년 전 | 590 | ||
| 7783 | 10년 전 | 391 | ||
| 7782 | 10년 전 | 446 | ||
| 7781 | 10년 전 | 845 | ||
| 7780 | 10년 전 | 775 | ||
| 7779 | 10년 전 | 746 | ||
| 7778 | 10년 전 | 315 | ||
| 7777 | 10년 전 | 398 | ||
| 7776 | 10년 전 | 402 | ||
| 7775 | 10년 전 | 339 | ||
| 7774 | 10년 전 | 600 | ||
| 7773 | 10년 전 | 321 | ||
| 7772 | 10년 전 | 665 | ||
| 7771 | 10년 전 | 326 | ||
| 7770 | 10년 전 | 612 | ||
| 7769 | 10년 전 | 328 | ||
| 7768 | 10년 전 | 547 | ||
| 7767 | 10년 전 | 1115 | ||
| 7766 | 10년 전 | 443 | ||
| 7765 | 10년 전 | 473 | ||
| 7764 |
잘살아보자
|
10년 전 | 325 | |
| 7763 |
|
10년 전 | 1400 | |
| 7762 |
Tosea
|
10년 전 | 1018 | |
| 7761 | 10년 전 | 613 | ||
| 7760 |
잘살아보자
|
10년 전 | 599 | |
| 7759 |
잘살아보자
|
10년 전 | 413 | |
| 7758 |
잘살아보자
|
10년 전 | 531 | |
| 7757 | 10년 전 | 1179 | ||
| 7756 |
ITBANK
|
10년 전 | 1217 | |
| 7755 | 10년 전 | 1893 | ||
| 7754 | 10년 전 | 996 | ||
| 7753 | 10년 전 | 841 | ||
| 7752 | 10년 전 | 1347 | ||
| 7751 |
잘살아보자
|
10년 전 | 470 | |
| 7750 |
잘살아보자
|
10년 전 | 440 | |
| 7749 |
잘살아보자
|
10년 전 | 435 | |
| 7748 |
잘살아보자
|
10년 전 | 419 | |
| 7747 |
잘살아보자
|
10년 전 | 507 | |
| 7746 |
잘살아보자
|
10년 전 | 631 | |
| 7745 |
잘살아보자
|
10년 전 | 874 | |
| 7744 |
잘살아보자
|
10년 전 | 386 | |
| 7743 | 10년 전 | 912 | ||
| 7742 |
starbros
|
10년 전 | 785 | |
| 7741 |
잘살아보자
|
10년 전 | 601 | |
| 7740 |
잘살아보자
|
10년 전 | 477 | |
| 7739 |
잘살아보자
|
10년 전 | 432 | |
| 7738 |
잘살아보자
|
10년 전 | 488 | |
| 7737 |
잘살아보자
|
10년 전 | 445 | |
| 7736 |
잘살아보자
|
10년 전 | 466 | |
| 7735 |
잘살아보자
|
10년 전 | 800 | |
| 7734 |
잘살아보자
|
10년 전 | 391 | |
| 7733 |
잘살아보자
|
10년 전 | 491 | |
| 7732 |
잘살아보자
|
10년 전 | 648 | |
| 7731 |
잘살아보자
|
10년 전 | 577 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기