the only errors i am getting now are:
Code:
error C2065: 'num' : undeclared identifier
error C2660: 'mySquareRoot' : function does not take 1 arguments
is this telling me that i do need to declare num before the main function?
ive gotten rid of a lot of errors now with your help, this is what i have so far.
Code:
#include <iostream>
#include <cmath>
using namespace std;
**int num;**
double mySquareRoot(**int**)
{
return sqrt(num);
}
int main()
{
--int num;--
do
{
cout << "Enter a number (a double): ";
cin >> num;
cout << "The square root is " << mySquareRoot(num) **<< endl**;
} while (num != 0);
}