I am trying to learn C++ using Visual Studio 2013 but I have an issue that prevents me to proceed. After starting the console on debug and getting input from a user console immediately closing. How can I make my program wait my command to close?
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double number, answer;
cout << "Enter a number: ";
cin >> number;
answer = sqrt(number);
cout << "Square root is " << answer << endl;
cin.get();
return 0;
}