#define c_spis "100;50;20;10;5;1;.50;.10;.01" maxbank=words(c_spis, ";") * pictures for the quantity, currency unit value and the final amount pc_ko="9,999" pc_bank="9,999.99" g_pc="999,999.99" k1=0 k2=k1+len(pc_ko)+4 k3=k2+len(pc_bank)+3 if type("g_pc")#"C" g_pc="99,999,999.99" endif if type("apoJ(1)")="N" maxbank=alen(apoJ) endif * apoJ[] holds the value of currency units * apoK[] holds the number of units of each size * apoQ[] holds the value in each of units if type("apoJ(1)")#"N" spisapo= c_spis maxbank=words(spisapo,";") dime apoJ(maxbank), apoK(maxbank), apoQ(maxbank) apoJ=0 apoQ=0 apoK=0 for i= 1 to maxbank apoJ(i)=val(wordnum(spisapo,i,";")) endf priv i, _izn _izn=TheQuantity for i=1 to maxbank apoK(i)=apoK(i)+int(_izn/apoJ(i)) apoQ(i)=apoK(i)*apoJ(i) _izn=_izn % apoJ(i) endf for i=1 to maxbank if apoK(i)#0 ? apoK(i) pict pc_ko at k1, "*", ; apoJ(i) pict pc_bank at k2, "=", ; apoQ(i) pict g_pc at k3 endif endf endifHTH