Using the code below I type the two numbers, but if I give enter after entering the second number the answer appears quickly and the debug closes.
int main(){
int num1, num2, answer;
cout << "Digite um número:";
cin >> num1;
cout << "Digite um número:";
cin >> num2;
answer = num1 * num2;
cout << "Resultado:" << answer << endl;
cin.get();
return 0;
}
I put
cin.get();
But it did not work.
I'm trying to use Ctrl + F5 to debug, but clicking on F5 locks my cursor and I have to click again to unlock, why?