Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static double rectangle1 (double a, double b, int n) {
- double result = 0.0;
- double h = (b-a)/n;
- for(double i = a; i < b-h; i+= h) {
- result += h * mathFunc(i+h/2);
- }
- return result ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement