home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #3 / Commodore_Disk_User_Vol.1_3_1988_-.d64 / divide (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  183 b   |  11 lines

  1. 200 input"divisor ";a
  2. 201 ifa=0thenend
  3. 210 input"dividend";b
  4. 211 c=int(a/b):print"result:":printc"[157].";:a=10*(a-c*b)
  5. 220 c=int(a/b)
  6. 230 printchr$(c+48);
  7. 240 a=10*(a-c*b)
  8. 250 geta$:ifa$<>""then300
  9. 260 ifathen220
  10. 300 print:print:run
  11.