Skip to content

Smart Calculator adds subtracts and multiplies numbers. It can also keep variables and use them in equations.

Notifications You must be signed in to change notification settings

piotr-bujnowski/smart-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

--- Smart Calculator Program ---

Smart Calculator DOWNLOAD

Input / Output examples

Program supports only natural numbers for this moment and [-, +, *, /] operator.

 >>3 + 8 * ((4 + 3) * 2 + 1) - 6 / (2 + 1)
 121
  
 >>8 * 3 + 12 * (4 - 2)  
 48  

 >>2 - 2 + 3  
 3  
  
 >>4 * (2 + 3  
 Invalid expression  
  
 >>-10  
 -10  
  
 >>veryBig = 80000000000000000000000000000  
 >>BIG = 100000000000000000000000  
 >>a=-4  
 >>b=5  
 >>c=6  
  
 >>a  
 -4  
  
 >>123abc = 23  
 Invalid Identifier  
  
 >>abc = ewq432d  
 Invalid assignment  
  
 >>abc = 12 - 2 = 32
 Invalid assignment  
  
 >>a*2+b*3+c*(2+3)  
 53  
  
 >>1 +++ 2 * 3 -- 4  
 11  

 >>3 *** 5  
 Invalid expression  
  
 >>4+3)  
 Invalid expression

Commands

/help : more information
/variables : print entered variables
/menu : print menu
/exit : exit program

>>/variables  
a = -4  
b = 5  
c = 6  
veryBig = 80000000000000000000000000000  
 
>>/menu  
 
--- Smart Calculator Program ---  
/help      : more information  
/variables : print entered variables  
/menu      : print menu  
/exit      : exit program  
  
>>/exit  
  
Bye  

About

Smart Calculator adds subtracts and multiplies numbers. It can also keep variables and use them in equations.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages