Advertisement
Josif_tepe

Untitled

Mar 9th, 2023
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. const double eps = 1e-9; // 1 / 10^9
  5.  
  6. int main()
  7. {
  8.     double L = 0.0;
  9.     double R = 20000.0;
  10.    
  11.     while(fabs(R - L) > eps) {
  12.         double mid = L + (R - L) / 2.0;
  13.        
  14.     }
  15.    
  16.     return 0;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement