Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Squad equation
program KvadratnaJednacina; var a,b,c,x1,x2,y,d:real; begin writeln('Unesite koeficijente: '); read(a,b,c); d:=b*b-4*a*c; if (d=0) then begin x1:=-b/(2*a); writeln('Dvostruko rjesenje jednacine je : ',x1:0:2) end else if (d>0) then begin x1:=(-b-sqrt(d))/(2*a); x2:=(-b+sqrt(d))/(2*a); writeln('Rjesenja jednacine su ',x1:0:2,' i ',x2:0:2) end else begin y:=sqrt(-d)/(2*a); x1:=-b/(2*a); writeln('Kompleksna rjesenja jednacine su ',x1:0:2,'+i',y:0:2,' i ',x1:0:2,'-i',y:0:2) end end.
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Matrix
test25
solar system 7
Programa para calcular digito verificador de un RUT
Бассейн-5
lecturas
sum_example1
444555666
JOAO PEDRO REIS PEREIRA CORREA 600622602
НОД всеми способами
Please log in to post a comment.