depending on what number they entered first. |
|
cin.get(); line before return 0;. When you use cin to get numbers like you do here, the newline character is left on the input buffer. The cin.get(); you use here gets that pending newline character and the program exits. You need to add one more cin.get(); to make it wait.