home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 February / Ahoy_Magazine_86-02_1986_Double_L.d64 / measure dec. (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1986-01-01  |  281 b   |  10 lines

  1. 0 rem << cd26-3 >>
  2. 1 rem  commodare #22-3 :
  3. 2 rem         measured decimals
  4. 3 rem  solution by matt shapiro
  5. 4 rem
  6. 10 input"how many inches (decimal)";d
  7. 20 w=int(d):n=int(64*(d-w)+.5):d=64:if n=64 then print w+1 : end
  8. 30 n2=n/2:if n2=int(n2) then n=n2:d=d/2:goto 30
  9. 40 print w;"and";str$(n);"/";mid$(str$(d),2):end
  10.