Skip to content

DayaTani/quadratic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadratic

Tool for finding roots of a quadratic equation.

Prerequisites

Before you can use this tool, ensure you have the following software installed on your system:

  • Node.js: This project recommends Node.js version 21.6 or higher for compatibility. We recommend using NVM (Node Version Manager) to manage your Node.js installations.

  • Yarn: You can install Yarn globally using npm (Node Package Manager).

Build

To install the necessary dependencies for this tool, navigate to the project directory in your terminal and run the following command:

yarn install

After installation, ensure everything is set up correctly by running the tests:

yarn test

Then build the app:

yarn build

Usage

Command Line Interface (CLI)

The CLI reads input from stdin and writes output to stdout in tab-separated values (TSV) format.

To use the CLI, pipe input from a file or manually enter coefficients of quadratic equations separated by tabs. For example:

Example usage:

yarn start < input.txt > output.txt

Here, input.txt contains coefficients, and output.txt will contain the roots of the corresponding quadratic equations.

License

This project contains proprietary code, and all rights are reserved by PT DayaTani Digital Indonesia. Unauthorized use, reproduction, or distribution of this code is strictly prohibited.

About

Simple exercise to write Node.js CLI apps. Used to onboard new backend engineers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors