Hi say i want a while loop, ok and were adding two numbers useing 'cin' statements. I want to add two numbers by the user in the while loop but they have the option to exit by typing '-1'
my while loop would look like this:
while ( num1 != -1)
Now if i put -1 in the first cin statement to end the loop its still asking me for the second number. Would a 'break' statement be what i need. Or do i need to rearange where i put my cin statements.
Thanks for your help.