Say if i have created two different stacks,and any integer over 10 goes in one stack(bigStack). If less than 10 goes in one stack(theStack). The program is already working where it will resize if its full,but I am trying to put the integers in the right Stack. This is what I have so far.
[ Jess added UBB [code] tags to preserve whitespace, check 'em out! ] [ September 23, 2003: Message edited by: Jessica Sant ]
Hi Joe, I find it really hard to believe that you could understand the program above, but still need to ask this question. It's important to take the time to read and understand code the code you're working with; you're not going to learn anything otherwise. That said, in a loop near the end of the program, you're reading each line, parseInt()-ing it, and pushing it onto a stack. All you need to do is use an "if" statement to choose between the two stacks -- i.e., "if (next < 10) ... else ..." [ September 22, 2003: Message edited by: Ernest Friedman-Hill ]