% Reseni kvadraticke rovnice (verze 2)
disp('Reseni kvadraticke rovnice ax^2 + bx + c = 0');
while true
    a = input('Koeficient a: ');
    if isempty(a)
        disp('Vypocet ukoncen.');
        return;
    elseif a == 0
        disp('Koficient ''a'' nesmi byt nulovy!');
        continue;
    end
    b = input('Koeficient b: ');
    c = input('Koeficient c: ');
    d = sqrt(b*b - 4*a*c);
    x12 = [(-b + d)/2/a; (-b - d)/2/a]
end
return;