home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / basic3 / pro5 / cconvert.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1990-04-12  |  1.3 KB  |  32 lines

  1. 100  REM CONVERSION TABLES FOR CUBIC MEASURES
  2. 105  WIDTH 80
  3. 110  REM IBM BASIC 
  4. 120  GOTO 170
  5. 130  PRINT STRING$(80,45):RETURN
  6. 140  CLS:FOR X=1 TO 10:PRINT:NEXT X:RETURN
  7. 150  PRINT:INPUT "Press >RETURN< (Q to quit) ",R$:IF R$="Q" OR R$="q" THEN 160 ELSE RETURN
  8. 160  GOSUB 140:GOSUB 130:PRINT TAB(38)"End.":GOSUB 130:RUN"FILES."
  9. 170  GOSUB 140:GOSUB 130
  10. 180  PRINT TAB(10)"This program consists of 2 subprograms that convert cubic measures"
  11. 190  GOSUB 130:GOSUB 150
  12. 200  GOSUB 140:PRINT TAB(10)"Menu:":GOSUB 130
  13. 210  PRINT 1,"Cubic inches versus cubic centimeters"
  14. 220  PRINT 2,"Cubic feet versus cubic meters":GOSUB 130
  15. 230  INPUT "Which?  ",WHICH:GOSUB 140:ON WHICH GOTO 240,320
  16. 240  PRINT TAB(10)"Convert:":GOSUB 130
  17. 250  PRINT 1,"Cubic inches to cubic centimeters"
  18. 260  PRINT 2,"Cubic centimeters to cubic inches":GOSUB 130
  19. 270  INPUT "Which?   ",WHICH:GOSUB 140:ON WHICH GOTO 280,300
  20. 280  INPUT "Number of cubic inches?    ",CI:GOSUB 130:CC=CI*16.387
  21. 290  PRINT CI;" cubic inches = ";CC;" cubic centimeters.":GOSUB 130:GOSUB 150:GOTO 200
  22. 300  INPUT "Number of cubic centimeters?  ",CC:GOSUB 130:CI=CC/16.387
  23. 310  PRINT CC;" cubic centimeters = ";CI;" cubic inches.":GOSUB 130:GOSUB 150:GOTO 200
  24. 320  PRINT TAB(10)"Convert:":GOSUB 130
  25. 330  PRINT 1,"Cubic feet to cubic meters"
  26. 340  PRINT 2,"Cubic meters to cubic feet":GOSUB 130
  27. 350  INPUT "Which?   ",WHICH:GOSUB 140:ON WHICH GOTO 360,380
  28. 360  INPUT "Number of cubic feet?     ",CF:GOSUB 130:CM=CF*0.02831
  29. 370  PRINT CF;" cubic feet = ";CM;" cubic meters.":GOSUB 130:GOSUB 150:GOTO 200
  30. 380  INPUT "Number of cubic meters?   ",CM:GOSUB 130:CF=CM/0.02831
  31. 390  PRINT CM;" cubic meters = ";CF;" cubic feet.":GOSUB 130:GOSUB 150:GOTO 200
  32.