mainSR1 - cout<<"The square root of"<<...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* Comptuing square roots. Author: Eric Van Wyk, Ted Kaminski. Date: Feb 22, 2010 */ #include <iostream> #include <string> using namespace std ; double mysqrt(double number_to_sqrt, double accuracy); int main() { cout << "Computing some sample square roots." << endl << endl ; double x = 3.1415 ;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout << "The square root of " << x << " is " << mysqrt(x, 0.0001) << endl ; x = 18.55 ; cout << "The square root of " << x << " is " << mysqrt(x, 0.0001) << endl ; x = 456.789 ; cout << "The square root of " << x << " is " << mysqrt(x, 0.0001) << endl ; }...
View Full Document

Ask a homework question - tutors are online