function [y] = zaokrouhleni(cislo, cislic)
% zaokrouhleni cisla na urcity pocet platnych cislic

x = cislo;
if cislo > 10
    while x > 1
        x = x / 10;
    end
    x = x*10;
else
    while x < 1
        x = x * 10;
    end
end

y = (round(x*(10^(cislic-1)))/(10^(cislic-1))) * (cislo / x);