#ifndef STACK_H #define STACK_H // Push an 'item' onto the stack. // Parameters: // stack - A pointer to an array use to store items in the stack. // top - A pointer to an integer that gives the index of the top of the stack. // size - The size of the stack. void stack_push(double* stack, int* top, int size, double item); // Pop an 'item' from the stack. // Parameters: // stack - A pointer to an array use to store items in the stack. // top - A pointer to an integer that gives the index of the top of the stack. double stack_pop(double* stack, int* top); // Remove all items from the stack. // Parameters: // stack - A pointer to an array use to store items in the stack. // top - A pointer to an integer that gives the index of the top of the stack. // size - The size of the stack. void stack_clear(double* stack, int* top, int size); // Print out all items in the stack. // Parameters: // stack - A pointer to an array use to store items in the stack. // top - A pointer to an integer that gives the index of the top of the stack. void stack_print(double* stack, int* top); #endif