This is a console application for solving quadratic equations by Kyrylo LLumisS Bukach, IM-11.
Quadratic equation is an equation of the form: ax2 + bx + c = 0
.
Application has two modes of operation:
- Interactive mode starts when the application does not receive any arguments. Application asks to enter three coefficients: a (which is not equals zero), b, c - all three should be valid real numbers.
- Non-interactive mode starts when the application receives a path to a .txt file as an argument.
- Install Node.js.
- Clone the repository on your local machine.
- Go to the cloned folder in your terminal.
- Install node dependencies using
npm i
. - Use the command
node main.js
to activate interactive mode,node main.js <path-to-file>
to activate non-interactive mode.
The file must contain three numbers: a b c
separated by spaces (\s). After c
newline character (\n) expected. Use dot .
to separate integer part of the number from decimal.
Link: https://github.com/LLumisS/mtsd-lab1/commit/3d15bebcd711b17a3c05e538ba375e2450c3d134