Skip to content

Instantly share code, notes, and snippets.

🤖

Alexey ndczz

🤖
  • Voronezh, Russia
Block or report user

Report or block ndczz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ndczz
ndczz / java.java
Created Nov 21, 2017
QuadroSolver
View java.java
class QuadraticSolver {
public static final int RESULT_BAD = 0;
public static final int RESULT_ONE = 1;
public static final int RESULT_TWO = 2;
public static final Result solve(double a, double b, double c) {
double d = b * b - 4 * a * c;
if (d < 0)
return new Result(RESULT_BAD, 0, 0);
double sqd = Math.sqrt(d);
You can’t perform that action at this time.