Question: Create Calculator in C language that evaluate user input math expressions and produce answer usinf stacks and linked list. The program will continue to evaluate
Create Calculator in C language that evaluate user input math expressions and produce answer usinf stacks and linked list. The program will continue to evaluate expression until exit is entered. Tasks: Ask user to enter expressions example: (9.342 + 2)^3 + 5!/6*sin(3.5*pi) 3*cos( 2!) 34-4^(3+2) + ln( 32 * tan(3pi)) Check to see if expression is valid -balance bracket? -illegal entry - expression may have empty space between operators but your program will remove it.
Display postfix expression. Use postfix expression to calculate value and display result. Must use expression tree (implement using linked list) & stacks (or queues). Support operation tokens: 1: + - * / % ^ pi () 2: ! log( ) ln( ) sin() cos() tan( ) 3: { } 4: constant pi=3.14159 5: %=modulus 6: ^ =exponents 7: ! = factorial 8: log(x)=log10 ( x ) Do not have the core logic in your main(). The main() should only have function calls and basic programme control and user input. Keep your code modular.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
