I would stop staring and start debugging, you might get further.
Seriously though, without going into a huge debugging lesson, you have several ways to solve this problem. It's also a good chance to learn _necessary_ basic debugging skills since this is obviously a simple "learning to program" app.
1) Brute force using IDE - if you have a nice IDE & debugger, set a breakpoint somewhere early, where you know the code still works. Then just step through the code line by line, making sure the results are what you expected as you progress.
2) Brute force using code - sprinkle those "cout" statements all over the place to 'tell' you the state of your variables and your location in the code. Then just follow along when you run it so you know the code is progressing as you expected.
3) Break it down into the smallest possible program that works, then gradually put it back together piece by piece.
Some other tips - look for some of the the obvious problems first -- Variables initialized properly, semi-colons in the right places (especially during flow-control like do's and while's), code flowing the way you expect it to, case sensitivity, variable naming conflicts, yada yada yada.
Also make sure you're not testing variables without initializing them first.
Using these tips, you should have this debugged in just a few mins.