Advertisement
goodvibes2298

Better steps

Feb 27th, 2023 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1.  
  2.     static double rectangle1 (double a, double b, int n) {
  3.         double result = 0.0;
  4.         double h = (b-a)/n;
  5.         for(double i = a; i < b-h; i+= h) {
  6.             result += h * mathFunc(i+h/2);
  7.         }
  8.         return result  ;
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement