home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
me_cd.arc
/
BIGNUM.MUT
< prev
next >
Wrap
Text File
|
1988-03-01
|
1KB
|
52 lines
; bignum : convert a number to a big number
; ###
; eg 2 => # #
; #
; #
; #
; #####
(string r1 80 r2 80 r3 80 r4 80 r5 80 r6 80 r7 80)
(defun
dump-row HIDDEN {(substr (arg 0)(* (arg 1) 7) 7)}
numvert HIDDEN
{
(if (< (arg 0) 10) (dump-row (arg 1) (arg 0))
(concat
(numvert (/ (arg 0) 10)(arg 1))
(dump-row (arg 1) (- (arg 0)(* 10 (/ (arg 0) 10))))
)
)
}
bignum ; input: number to make big
{
(msg (numvert (arg 0) r1))
(msg (numvert (arg 0) r2))
(msg (numvert (arg 0) r3))
(msg (numvert (arg 0) r4))
(msg (numvert (arg 0) r5))
(msg (numvert (arg 0) r6))
(msg (numvert (arg 0) r7))
}
)
; initialize each row
(r1
;1234567.234567.234567.234567.234567.234567.234567.234567.234567.234567.
" ### # ### ### # ##### ## ##### ### ### ")
(r2
"# ## ## # # # # ## # # # # # # # ")
(r3
"# # # # # # # # # # # # # # # ")
(r4
"# # # # # ## # # #### #### # ### #### ")
(r5
"# # # # # # ##### # # # # # # # ")
(r6
"## # # # # # # # # # # # # # # ")
(r7
" ### ##### ##### ### # ### ### # ### ## ")
(int n)(n (atoi (ask "n = ")))
(bignum n)