Skip to content

artemmatiushenko1/quadratic-equations-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadratic equations solver

It is a console application for solving simple quadratic equations.

Installation

  1. Clone the repo:
    git clone https://github.com/artemmatiushenko1/quadratic-equations-solver.git
  2. Open project's directory and install NPM packages:
    npm install

Usage

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 and c values. Hit enter when you finished entering each value. After the input of the last value the equation roots will be calculated. Example: image

  • 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, where a, b and c 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 replace path/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.

    Example: image

Built with

  • Node.js
  • JavaScript
  • propmt-sync npm package

Revert commit - link