Skip to content

osalmine/computorV1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

computorV1

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

ComputorV1 solves equations up to the second degree.

Grade:

osalmine's 42 computorv1 Score: 119/100

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.

About

Hive - computorV1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published