Skip to content

Instantly share code, notes, and snippets.

@opilar
Created November 24, 2012 17:18
Show Gist options
  • Save opilar/4140590 to your computer and use it in GitHub Desktop.
Save opilar/4140590 to your computer and use it in GitHub Desktop.
6
var
A,B,C:real;
X1,X2,Xmin: real;
D,V:real;
begin
writeln ('Wedite koeficient A,B,C');
readln (A,B,C);
if A=0 then
if B=0 then
writeln ('Uravnenie vyrazhdeno')
else
writeln ('Edinstveniy koren x=',-C/B:6:3)
else
begin
D:=B*B-4*A*C;
if D<0 then
writeln ('Deistvitelnix korney net')
else if D=0 then
X1:=-B/(2*A)
else
begin
D:=Sqrt(D);
X1:=(-B+D)/(2*A);
X2:=(-B-D)/(2*A);
if X1<X2 then
Xmin:=X1
else
Xmin:=X2
end;
end;
V:=sin(d*exp(0.2*ln(Xmin*Xmin+4)))*exp(2*Xmin);
writeln ('a=', a:6:3);
writeln ('b=', b:6:3);
writeln ('c=', c:6:3);
writeln ('x=', x:6:3);
writeln ('V=', v:6:3);
readln;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment