Advertisement
kasper_k

mmm3solve2

Oct 18th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. //#include <conio.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     double x0=0.6,y0=0.8,x,y,d1,d2,eps=0.000001;
  9.     setlocale(LC_ALL, "Russian");
  10.     do
  11.     {
  12.         x=(sin(x0 + y0) - 0.1) / 1.2;
  13.         y=sqrt(1 - x0 * x0);
  14.         d1=sin(x + y) - 1.2 * x - 0.1;
  15.         d2=x * x + y * y - 1;
  16.         x0=x;
  17.         y0=y;
  18.     }while(abs(d1)>eps && abs(d2)>eps);
  19.     cout<<"x="<<x<<" "<<"y="<<y<<endl;
  20.     //getch();
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement