home *** CD-ROM | disk | FTP | other *** search
/ 64'er Magazin 1990 March / 64er_Magazin_90-03_1990_Markt__Technik_de_Side_A.d64 / umrechnung (.txt) < prev   
Commodore BASIC  |  2022-10-26  |  953b  |  21 lines

  1. 0 poke19,64:s=0:poke53272,21:poke53280,6:poke53281,6
  2. 1 printchr$(8)"[147]  <<< [159]umrechnung  by rasto levrinc >>>":c$="  (1-36)"
  3. 2 a$="basis zahlensystem":print"1....roemische zahl":print"2-36."a$
  4. 3 print"eingangs "a$c$" :[159]";:gosub16:c=d:print"ausgangs "a$c$" :[159]";:gosub16
  5. 4 poke214,11:print:input"zahl eingeben :[159]";d$:e$=d$:s=len(e$):ifs>24ors=0goto4
  6. 5 r$="":e=0:restore:ifc>1goto10
  7. 6 on-(r$="i")goto4:readr$,r
  8. 7 ifr$<>mid$(e$,1,len(r$))goto6
  9. 8 e$=right$(e$,len(e$)-len(r$)):e=e+r:ife$<>""goto7
  10. 9 restore:s=e:gosub17:on-(d$<>e$)goto4:e=s:goto12:datam,1000,cm,900,d,500,cd,400
  11. 10 fora=1tos:b=asc(mid$(e$,a,1)):r=b-48+7*(b>64):ifr>=corr<0goto4
  12. 11 e=e+int(c^(s-a)*r):next:ife>=10^9or(d=1and(e>240000ore<1))goto4
  13. 12 restore:a$=" (":print:print" "d$a$c") = ";:e$="":ifd=1thengosub17:goto19
  14. 13 r=int(e/d):s=e-r*d:e$=chr$(s+48-7*(s>9))+e$:e=r:ifegoto13
  15. 14 goto19:datac,100,xc,90,l,50,xl,40,x,10,ix,9,v,5,iv,4,i,1
  16. 15 poke211,37:poke214,9+s:print"[145]";
  17. 16 b$="":inputb$:d=int(val(b$)):on-(d<1ord>36)goto15:s=2:poke214,9:print:return
  18. 17 readr$,r:on-(e/r<1)goto17:e=e-r:e$=e$+r$:ifethenrestore:goto17
  19. 18 return
  20. 19 printe$a$d")":print"nochmal (j/n)":poke198,0:wait198,1:geta$:ifa$<>"n"goto
  21.