Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main =>
- A = read_int(),
- B = read_int(),
- C = read_int(),
- D_ = sqrt(B * B - 4 * A * C),
- if D_ == 0.0 then
- Y = -B/(2*A),
- if ceiling(Y) == floor(Y) then
- print(floor(Y))
- else
- print(Y)
- end
- else
- X1 = (-B + D_)/(2*A),
- X2 = (-B - D_)/(2*A),
- L = sort([X1, X2]),
- foreach (X in L)
- if ceiling(X) == floor(X) then
- print(floor(X))
- else
- print(X)
- end,
- print(" ")
- end
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement