;Trideni metodou Radix N=100 M=9 ;pocet prihradek Dim pole(N) Dim pompole(M,N) Dim poc(M) Statement Vypis{} SHARED pole(),N For i=0 To Int(N/10)-1 For j=1 To 10 Print pole(i*10+j)," " Next j NPrint "" Next i End Statement Statement Vypis2{} SHARED pole(),poc(),pompole(),M,N For i=0 To M Print i,"-" For j=1 To poc(i) Print pompole(i,j),"," Next j NPrint "" Next i End Statement Statement Vypis3{} SHARED pole(),N For i=1 To N Print pole(i),"," Next i a=Edit(2) End Statement Statement Radix{} SHARED pole(),pompole(),poc(),N,M For i=0 To 3 ;cyklus pres vsechny rady ;vybirame prvek po prvku a radime ho do pompole podle cislice na i-tem radu For j=0 To M poc(j)=0 Next j For j=1 To N a=Int((pole(j)-Int(pole(j)/(10^(i+1)))*10^(i+1) )/(10^i)) ;v Blitzu neni celociselny deleni ? - (pole(j) mod (10^(i+1))) poc(a)=poc(a)+1 pompole(a,poc(a))=pole(j) Next j ;Vypis2{} ;a ted vezmeme vsechny prvky z jednotlivych poli a dame je do jednoho pole uk=0 For j=0 To M For k=1 To poc(j) uk=uk+1 pole(uk)=pompole(j,k) Next k Next j ;Vypis3{} Next i End Statement For i=1 To N pole(i)=Int(Rnd(9999)) Next i NPrint "Nesetridene pole:" Vypis{} Radix{} NPrint "Setridne pole" Vypis{} a=Edit(2) End