You can't use copy and paste code from the internet for a stack and expect it to meet your assignment: you need to use an array in a different way.
You need two indexes:
top_left
and
top_right
together with the functions your teacher describes:
Insert_odd
insert_even
isfull_odd
isfull_even
isempty_odd
isempty_even
iscollide_even_odd
Because your array size if defined for you - 10 elements - your
top_left
and
top_right
indexes should start from 0 and 9 respectively.
The
isempty_xxx
functions are simple: they check if the appropriate index is at it's starting value.
iscollide_even_odd
is also simple is the right index smaller than the left index?
The push and pop operations are very similar to those you found, but with the "right" ones going "downwards" instead of up.
Give it a try: this isn't complicated - if you are having problems getting started at all, then this may help:
How to Write Code to Solve a Problem, A Beginner's Guide[
^]