问题描述
我真的很难用Stack ...
问题就是这样:
创建一个数组( a [10])。
如果选择== 1,请按数字。
如果选择== 2,弹出数字,
如果选择== 3,则显示堆栈。
如果选择== 0退出。
请帮助我!
我是新来的堆叠,这就是为什么我遇到了一些困难。
谢谢。
I''m really having a hard time with Stack...
The problem goes this way:
Create an array ( a[10] ).
If choice == 1, push number.
If choice == 2, pop number,
If choice == 3, display stack.
If choice == 0 quit.
Please help me!
I''m new to stacks that''s why I''m having some difficulties.
Thank you.
推荐答案
不要非常迂腐(只是一点点):
我会说堆栈是一个列表采用LI-FO,队列是FI-FO结构,恕我直言,定义采用FI-FO策略的LI-FO结构没有多大意义.......
Not to be horribly pedantic (just a little bit):
I would say that a stack is a list which adopts LI-FO, A queue is a FI-FO structure, and IMHO it doesn''t make much sense to define a LI-FO structure which adopts a FI-FO strategy.......
感谢您的帮助!
但是,你能帮我制作一个POP,PUSH和DISPLAY堆栈的程序吗?我真的很难过。
请问?
谢谢!
Thanks for the help!
But can you help me make a program that would POP, PUSH and DISPLAY the stack? I''m really having a hard time.
PLEASE?
Thank you!
这篇关于你可以帮我堆栈吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!