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