No description
Find a file
2018-05-21 02:07:52 +08:00
interp.l modified something 2018-05-21 01:56:44 +08:00
interp.y modified something 2018-05-21 01:56:44 +08:00
LICENSE Initial commit 2018-05-21 00:12:18 +08:00
Makefile Create Makefile 2018-05-21 00:13:18 +08:00
README.md modifying README.md 2018-05-21 02:07:52 +08:00

one-variable-linear-equation-solver

A program to solve one-variable linear equation. It's written in C with flex and bison.

Dependencies

  • flex >= 2.6.0
  • bison >= 3.0.0
  • make >= 4.1
  • gcc >= 5.4.0

Compile

Type make after entering the folder of the repo.

Execute

Execute it with the command:

./interp

After showing the introdution, type the formula (eg. 2*x+5), then press enter to solve it. For example:

A program to solve f(x) = 0 such that f(x) is a 1-var linear function.
Please Enter a 1-var linear function:  2*x+5           
ANSWER: x = -2.500000