home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Samples / BS2FR202 / BS2FR202.ZIP / WALLPAPR.BAS (.txt) < prev   
Encoding:
GW-BASIC  |  1994-01-25  |  550 b   |  11 lines

  1. 10  ' WALLPAPR.BAS - 1/25/94
  2. 15  ' --- Calculate the number of single rolls of wallpaper needed
  3. 17  '     for a rectangular room of known dimensions.
  4. 20  INPUT "Room width (ft.) ";W: INPUT "Room length (ft.) ";L
  5. 40  INPUT "Ceiling height (ft.) ";H: P=2*L+2*W: A=P*H: N=A/30
  6. 70  INPUT "Number of windows";NW: INPUT "Number of doors";ND
  7. 90  OP=NW+ND: SR=N-OP/2: IF INT(SR)<>SR THEN SR=INR(SR)+1
  8. 110  PRINT: PRINT SR;"single rolls": PRINT "without the ceiling."
  9. 130  A=A+L*W: N=A/30: SR=N-OP/2: IF INT(SR)<>SR THEN SR=INT(SR)+1
  10. 140  PRINT: PRINT SR;"single rolls": PRINT "including the ceiling.": END
  11.