DEFINITE INTEGRALS



This program evaluates a definite integral of the preset function.You can change the FUNCTION in the macro.


#include<math.h>
#define FUNCTION sin (x)
main()
{
float x,a,b,n;
printf("enter the lower limit of integration:");
scanf("%f",&a);
printf("enter the upper limit of integration:");
scanf("%f",&b);
for(x=a,n=0;x<=b;x+=.00001)
n=n+(FUNCTION*(0.00001));
printf("%f",n);
getch();
}


Go to the programs pageclick here!!

Hosted by www.Geocities.ws

1