bttg10 - if delta==0 disp('cift katli kok vardir') elseif...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% ikinci dereceden denklem koklerinin hesaplanmasi format compact; %satir araligi birakilmayacagini gosterir %ax^2+bx+c=0 disp('ax^2+bx+c=0') a=input('a katsayisini girin a= ') b=input('b katsayisini girin b= ') c=input('c katsayisini girin c= ') delta=b*b-4*a*c; disp('diskriminant'),disp(delta)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if delta==0 disp('cift katli kok vardir') elseif delta>0 disp('reel iki kok vardir') elseif delta<0 disp('reel kok yoktur') end x1=(-b+sqrt(delta))/(2*a); disp('Birinci Kok'), disp(x1) d x2=(-b-sqrt(delta))/(2*a); disp('kinci Kok'), disp(x2)...
View Full Document

Ask a homework question - tutors are online