Skip to content

ArcaLunar/calculator

Repository files navigation

Calculator

A custom calculator which supports expression evaluations, and implements a simple variable system.

How to use?

Run in the terminal using cmake --build . and then ./calc

>>>>> is intended to simulate Python interactive UI, which might be a little more user-friendly.

Supported Operation

  • +: addition
  • -: subtraction
  • *: multiplication
  • /: float division
  • ^: power
  • (): braces
  • and variable system (variables must be initialized before using, otherwise default 0)

Updates

2023.11.14

Fix bugs when encountering lots of braces

Fix logic of identifying negative numbers

2023.11.13

Divide project into .hs and .cs, easier to maintain.

Add CMake

2023.10

Fix bugs when encountering negative numbers.

About

A terminal calculator written in C that supports simple math expressions and simple variable system. 一个用C实现的、支持四则运算+乘方和变量的简易终端计算器。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors