home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1994-01-25 | 550 b | 11 lines |
- 10 ' WALLPAPR.BAS - 1/25/94
- 15 ' --- Calculate the number of single rolls of wallpaper needed
- 17 ' for a rectangular room of known dimensions.
- 20 INPUT "Room width (ft.) ";W: INPUT "Room length (ft.) ";L
- 40 INPUT "Ceiling height (ft.) ";H: P=2*L+2*W: A=P*H: N=A/30
- 70 INPUT "Number of windows";NW: INPUT "Number of doors";ND
- 90 OP=NW+ND: SR=N-OP/2: IF INT(SR)<>SR THEN SR=INR(SR)+1
- 110 PRINT: PRINT SR;"single rolls": PRINT "without the ceiling."
- 130 A=A+L*W: N=A/30: SR=N-OP/2: IF INT(SR)<>SR THEN SR=INT(SR)+1
- 140 PRINT: PRINT SR;"single rolls": PRINT "including the ceiling.": END
-