I'm using the Window Console to create a excerice out of a book for beginers. First it's coded to ask for a number, then after you press the enter key it tells you the results, in about 2 seconds it just closes the Window Console. How can I prevent the Window Console from closeing? I'll give you the code below.
#include <iostream>
using namespace std;
double Cube (double Value);
main ()
{
double Number, CubeNumber;
cout << "Enter a number: ";
cin >> Number;
CubeNumber = Cube (Number);
cout << CubeNumber << endl;
return 0;
}
double Cube (double Value)
{
double CubeReturn;
CubeReturn = Value * Value * Value;
return CubeReturn;
}