you could use a while loop or if your using m$ use cmd to open the exe
but any ways the while loop for ya
#include <iostream>
using namespace std;
double Cube (double Value);
main ()
{
char quit; //declare a char variable char
while (quit != 'q') //the while loop
{
double Number, CubeNumber;
cout << "Enter a number: ";
cin >> Number;
CubeNumber = Cube (Number);
cout << CubeNumber << endl;
cout << "\nPress q to quit\n";
cin>>quit; //when q is entered the program will exit
}
return 0;
}
double Cube (double Value)
{
double CubeReturn;
CubeReturn = Value * Value * Value;
return CubeReturn;
}
Think this is what your after

but i would recomend using the cmd method intill you get used to loops and the way they work.