/computorV1

Hive - computorV1

Primary LanguageGo

computorV1

This project aims to make you code a simple equation solving program.

ComputorV1 solves equations up to the second degree.

Grade:

osalmine's computorV1 Score

SEE SUBJECT FOR MORE DETAILS

Usage

This project is written with go, so you need that installed

After cloning, make compiles the executable computorV1

make test runs the tests

make fclean removes the executable

make re removes the executable and recompiles

./computor -h displays the help message

How it works

The program splits the input string into "cells" which are monomials.

monomials

It then combines all cells with the same exponent so that there is only one cell for each exponent.

exponent-combination

After this, depending on the highest exponent, it solves the equation either with the linear or the quadratic formula.