Tweet
#include<stdio.h>
#include<math.h>
float f(float x,float y)
{
return x-y;
}
main()
{
printf("\nProgram to implement Euler's Method (x-y) : \n");
int i,n;
float x0,y0,x,y,h;
printf("\nEnter the values of x0,y0,h,x : ");
scanf("%f%f%f%f",&x0,&y0,&h,&x);
n=(x-x0)/h;
x=x0,y=y0;
for(i=0;i<=n;i++)
{
y=y+h*f(x,y);
x=x+h;
}
printf("\nThe required value is %f\n\n",y);
}
Euler Method in C Programming
Posted by
LAHAUL SETH
~
Euler Method in C Programming
2012-01-03T10:00:00+05:30
LAHAUL SETH
Numerical Methods
|
Programming in C
|
Comments
Euler Method in C Programming
2012-01-03T10:00:00+05:30
LAHAUL SETH
Numerical Methods
|
Programming in C
|