Program Rumus_abc;
Uses wincrt;
var
a,b,c : real;
x1,x2 : real;
begin
write(‘Masukkan Nilai A= ‘);readln(a);
write(‘Masukkan Nilai B= ‘);readln(b);
write(‘Masukkan Nilai C= ‘);readln(c);
x1:=(-b+sqrt(sqr(b)-4*a+c))/(2*a);
x2:=(-b-sqrt(sqr(b)-4*a+c))/(2*a);
writeln(‘x1= ‘,x1:0:3 );
write(‘x2= ‘,x2:0:3 );
read;
end.
0 komentar:
Posting Komentar
Terimakasih Telah membaca artikel kami. Silahkan tinggalkan komentar anda disini.