Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <cmath>
- using namespace std ;
- int main ()
- {
- cout << "Podaj liczbe ktora chcesz pierwiastkowac:" <<endl;
- float root ;
- cin >> root ;
- cout << "Podaj liczbe iteracji:" <<endl;
- int liczba_iteracji ;
- cin>> liczba_iteracji ;
- cout << "Podaj liczbe poczatkowa:" <<endl;
- float *x0 ;
- cin>> *x0 ;
- float x1;
- for(int i=0;i<=liczba_iteracji;i++) ;
- {
- x1=0,5*((*x0)+(root/(*x0)) ;
- x1=x0 ;
- cout << x1 ;
- }
- system ("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement