rootTesterN

rootTesterN - /= /rootTesterN.cpp...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
//=========================================== //rootTesterN.cpp //Code to test the first square root function //=============================== #include  #include  using namespace std; double squareRootN(double x, int N); //============>> main << ==================== int main() { cout.precision(15); // show lots of digits double x; int N; cout << "Input x and number of iterates [q to quit] :> "; cin >> x; cin >> N; while( not cin.fail()) { // we have valid input so give it a try cout<< "squareRootN(" << x << ", " << N << ") = "; cout<< squareRootN(x, N)<<endl;  cout<< "sqrt(" << x << ") = " << sqrt(x) <<endl;  cout <<"Difference = " << squareRootN(x, N) - sqrt(x) << endl; cout<<"====================================" <<endl; cout<< "Input x and number of iterates [q to quit] :> "; cin >> x >> N ;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

rootTesterN - /= /rootTesterN.cpp...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online