IMPLEMENTATION CALCULATOR USING STACK IN C PROGRAMMING
Daftar Isi:
- In computer science, calculator is electronic device that works as a tool to perform mathematical calculations. In making the calculations, this device uses an electric current as the basic process. And a stack is a Last In, First Out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element, but is characterized by only two fundamental operations: push and pop. The push operation adds an item to the top of the stack, hiding any items already on the stack, or initializing the stack if it is empty. The pop operation removes an item from the top of the stack, and returns this value to the caller. A pop either reveals previously concealed items, or results in an empty stack. Application of stack in this program is as place for saved of operator when program make a change infix notation to postfix notation, besides also depositor of number when program do enumeration. This matter because of in this program use one stack but having two different variable, that is integer and character, and by using nature of from stack that is LIFO and two operation of stack that is push and pop. With stack as data struct, this program can count mathematics operation which use 4 operator: +, -, *, /, and also can change infix expression to postfix expression. In certain case also can count mathematics operation using parenthesis.