Question: Your program will ask the user to enter a sequence of positive
integers terminated with a negative number.
As each number is entered, push the number to a stack.
After the sequence is terminated, prompt the user for an
additional number (n).
Your program, must IN ORDER, display the last (n) numbers
the user entered.
//For example, if the sequence entered is
// 9 8 4 3 5 6 2 -1
//And the additional number is
//The output of the program should be
// 5 6 2
//(Note that the terminal negative integer is not included).
HINT: use a second stack.
TutorTeddy.com & Boston Predictive Analytics
[ Email your Statistics or Math problems to email@example.com (camera phone photos are OK) ]
Boston Office (Near MIT/Kendall 'T'):
Cambridge Innovation Center,
One Broadway, 14th Floor,
Cambridge, MA 02142,
Dallas Office (Near Galleria):
15950 Dallas Parkway,
Dallas, TX 75248,