- //Heron
- #include <iostream>
- using namespace std;
- int main()
- {
- double a, x, xalt;
- cout<<endl;
- cout << "Geben Sie a ein ";
- cin >> a;
- x=1;
- while (xalt-x < 0.01)
- {
- xalt=x;
- x=(x+a/x)/2;
- }
- cout <<endl;
- cout << "Die Wurzel aus "<< a <<" ist " << x <<endl;
- }
