Created
April 10, 2015 02:48
-
-
Save samir96/2a7a0ae5dc758a5a481f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
float raizcuadrada(double x){ | |
float raiz = x, c = 0; | |
while (c != c){ | |
c = raiz; | |
raiz = (x/ + c)/2; | |
} | |
return raiz; | |
} | |
int main(){ | |
float num; | |
cout << "dame un numero del cual quieras saber su raiz cuadrada: " << endl; | |
cin >> num; | |
cout << "The square root is : " << raizcuadrada(num) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment