/*-------------------------------------------------------------------*/ /* teststackao.c (A Stack Abstract Object Client) */ /*-------------------------------------------------------------------*/ #include "stackao.h" #include int main(void) /* Test the Stack abstract object. */ { Stack_init(); Stack_push(1.1); Stack_push(2.2); Stack_push(3.3); while (! Stack_isEmpty()) printf("%g\n", Stack_pop()); Stack_free(); Stack_init(); Stack_push(4.4); Stack_push(5.5); Stack_push(6.6); while (! Stack_isEmpty()) printf("%g\n", Stack_pop()); Stack_free(); return 0; } /* Output: 3.3 2.2 1.1 6.6 5.5 4.4 */