Well, for one, when you declare the variable containers on line 6, you then immediately check to see whether it is equal to 0 in a while loop. What value does containers actually hold at that point? When you subtract 50?
The problem with your code is that it runs sequentially- from the top of main() to the bottom. Your while() loop and everything else is being ran before you get values for anything. Consider moving it until after you get all of the user inputs.