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