home *** CD-ROM | disk | FTP | other *** search
- \ Answers for problem 2.7
- \ Author: Dickson Cheng 03/29/90 09:47:29.14
-
- \ a)
- : TANK_VOLUME ( L W H -- )
- CR ROT DUP ." Length" . ." feet" ( L W H -- W H L )
- CR ROT DUP ." Width " . ." feet" ( W H L -- H L W )
- CR ROT DUP ." Height" . ." feet" ( H L W -- L W H )
- CR * * ." Volume" . ." cubic feet ; ( L W H -- )
- \ b)
- \ Since the largest positive number of an signed integer is 32767,
- \ for a cubical tank where l=w=h, the maximum length of each would be the
- \ cube root of 32767 (floored) or 31. And the maximum volume will be 29791.
-
-
-
-
-