It is a console application for solving simple quadratic equations.
- Clone the repo:
git clone https://github.com/artemmatiushenko1/quadratic-equations-solver.git
- Open project's directory and install NPM packages:
npm install
Application is able to work in two different modes:
-
Interactive mode - user should input the equation coefficients directly from the console. To run this mode execute the following command in the terminal:
npm run equations-solver
An application will ask you to enter
a
,b
andc
values. Hitenter
when you finished entering each value. After the input of the last value the equation roots will be calculated. Example: -
Non-interactive / file mode - the application should recieve a path to the
txt
file while starting, which contains equation coefficients in a special format -a\sb\sc\n
, wherea
,b
andc
are the coefficients of a quadratic equation,\s
- single whitespace and\n
- a new line. To run this mode execute the following command in the terminal and replacepath/to/file.txt
with your own path to the file with the coefficients:npm run equations-solver path/to/file.txt
After executing the command above the roots of equation will be immediately calculated.
- Node.js
- JavaScript
propmt-sync
npm package
Revert commit - link