fork download
  1. #include <iostream.h>
  2. #include <iomanip>
  3. #include <stdio.h>
  4. #include <math.h>
  5. float a, b, EPS=10E-7;
  6. float x1, DELTA, x2;
  7. int n=0;
  8. int main() {
  9. cout << "\n\n*********************************************************************\n\n";
  10. cout<< " Metod dotuchnuh (2.1.8) ";
  11. cout<< "\n\n*********************************************************************\n\n";
  12. cout<< " Vvedit megi a : "; cin>>a;
  13. cout<< " b : "; cin>>b;
  14. x1=(a+b)/2;
  15. do { n=n+1;
  16. x2=x1-(log(x1)*log(x1)-log(x1)-2)/(2*log(x1)/x1-1/x1);
  17. DELTA=fabs(x2-x1);
  18. if (DELTA>EPS)
  19. x1=x2; }
  20. while(DELTA>EPS);
  21. printf (" Korin'=%40.37f\n",x2);
  22. printf (" Chuslo iteratsiu=%i",n);
  23. cout<< "\n\n*********************************************************************\n\n";
  24. printf (" Tochnist E = %40.37f\n",EPS);
  25. getchar();
  26. return 0;
  27.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>
                      ^
compilation terminated.
stdout
Standard output is empty