VladSez / quadratic-equation

Recall school math!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quadratic equation

Recall school math!

Task

Your task is to implement solveEquation function, wihch solves Quadratic equation. Each equality has exact 2 integer solutions. Return those numbers as ordered array.

Example:

  const solutions = solveEquation('2 * x^2 - 10 * x + 12');
  console.log(solutions); // [2, 3]

Write your code in `src/index.js. Be sure, that all tests are positive. That means you cannot catch any error in tests.

Prepare and test

  • Install Node.js
  • Clone this repository: git clone https://github.com/yankouskia/quadratic-equation.git
  • Go to folder quadratic-equation
  • Run npm install in command line
  • Run npm test in command line
  • You will see the number of passing and failing tests

About

Recall school math!

License:MIT License


Languages

Language:JavaScript 100.0%