Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void RunKut(double a, double b, double h, double y0, double(*f)(double, double), FILE *file) {
- double x = a, y = y0;
- while (x <= b) {
- y = y + ((f(x, y)+ f(x+h, y+h))*h)/2.0;
- fprintf(file, "%10.5lf %10.5lf\n", x, y);
- x += h;
- }
- fprintf(file, "\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement