Created
May 12, 2015 12:03
-
-
Save yask123/45c3866a14313cd17fe1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # include <stdio.h> | |
| double f(double x,double y) | |
| { | |
| return (x+y); | |
| } | |
| int main() | |
| { | |
| double x0=0; | |
| double y0=1; | |
| double h=0.1; | |
| int i=0; | |
| int n=10; | |
| for(i=0;i<n;i++) | |
| { | |
| y0 = y0 + h * f(x0,y0); | |
| x0+=h; | |
| } | |
| printf("%lf",y0); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment