Translate

Labels

Showing posts with label SIMPSON'S RULE. Show all posts
Showing posts with label SIMPSON'S RULE. Show all posts

Sunday, 16 June 2013

PROGRAM TO FIND INTEGRAL VALUE USING SIMPSON'S RULE

#define f(x) 1.0/(1+x*x)
main()
{
int n;
float simps(float,float,int)a,b;
printf("Enter the values of a,b and n\n");
scanf("%f%f%d",&a,&b,&n);
printf("Integral value of f(x) by simpson's 1/3 rule:%f\n",simps(a,b,n));
}