home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1991 June
/
64er_Magazin_91-06_1991_Markt__Technik_de.d64
/
zahl
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-10-26
|
862b
|
17 lines
1 data,10,zehn,ein,11,elf,zwei,12,zwoelf,drei,16,sechzehn,vier,17:datasiebzehn,fuenf,20,zwanzig,sechs,30,dreissig,sieben:data60,sechzig,acht,70,siebzig,neun,,:a$="":b$="":c$="":g$="":b=0:m=0:x=0:i=0:goto5
2 forv=0to8:ifval(c$)=w(v)thene$(2)=w$(v):m=1
3 nextv:return
4 a$=right$(a$,b):fori=b+1to7:a$="0"+a$:nexti:return
5 inputa$:forx=0to9:readv$(x),w(x),w$(x):nextx:a$=str$(int(val(a$))):b=(len(a$))-1:gosub4:a$=right$(a$,6):ifa$="000000"orb>6thenclr:goto5
6 forx=1to4step3:b$=mid$(a$,x,3):fori=3to1step-1:e(i)=val(mid$(b$,i,1)):e$(i)=v$(e(i)):nexti:c$=mid$(b$,2):ife(2)=0ore(2)=4ore(2)=5ore(2)=8ore(2)=9goto10
7 gosub2:ifm<>1thenc$=left$(c$,1)+"0":gosub2
8 ifc$="11"orc$="12"orc$="16"orc$="17"thene$(3)=""
9 goto13
10 ife(2)>0thenifm<>1thene$(2)=e$(2)+"zig"
11 ife(3)=1thenife(2)=0thenife(1)>0thenifx=1thene$(3)="eins"
12 ife(3)=1thenife(2)=0thenifx>1thene$(3)="eins"
13 ife(2)>1thenife(3)>0thene$(3)=e$(3)+"und"
14 ife$(1)<>""thene$(1)=e$(1)+"hundert"
15 g$=g$+e$(1)+e$(3)+e$(2):ifx=1thenifb$<>"000"theng$=g$+"tausend"
16 m=0:nextx:printg$