clc clear all format long a=-1.5; b=-0.75; eps=10^(-6); x0=a; y0=b; Z0=(x0+y0)/2; i=0; while abs(funkcja(Z0))>eps Z0=(x0+y0)/2; i=i+1; if funkcja(x0)*funkcja(Z0)<0 y0=Z0; else x0=Z0; end end Z0 i