I think the problem is my use of the WHILE loop. I am trying to set it up where the loop repeats until the condition has been fulfilled. I thought I could use an increment to repeat the loop, but the result is that the last number simply repeats itself, without repeating the initial request or exiting the loop (when either the user says "no" or achieves a "BUST". Where am I going wrong?
In this piece of code, you essentially ignore the user's input. This loop will always run until you bust, because weather or not you hit n or y the computer will add to the total. Try this instead:
I would also recommend separating your code into functions, so that you don't have to re-write newNum = rand()%11 repeatedly.
Also, please try to use more unique variable names, as it gets very difficult to read your code with too similar variables, like newSumNumandnewNewSumNum, especially when they're the same type. Hope this helps!
EDIT: I was working with your code a bit, and I think this is a far more efficient way to write it:
You should REALLY name your variables better, then again I have the same habit. Anways the problem is that your never changing newSumNum in the loop so it's always going to be the same number. If you want to exit the loop when the user says no have an if statement and use the break command to break out of it when needed to. Also your question was kind of hard to understand so forgive me if that's not the right answer.