% % Targil 2: % ========= % % Solving the square equation. % ax^2 + bx +c=0 % % 1x^2 - 4x +3=0; % (x1=1, x2=3) % A= input('enter a'); B=input('enter b'); C=input('enter c'); x1=((-B+sqrt(B^2-4*A*C))/2*A); x2=((-B-sqrt(B^2-4*A*C))/2*A); disp([' the x1 is: ' num2str(x1)]); disp([' the x2 is: ' num2str(x2)]);