Trapezoidal Rule using C programming : In mathematics, the trapezoid rule is a numerical integration method, that is, a method to calculate approximately the value of the definite integral. The Formula is : = =h/2[(y0+yn)+2*(y1+y2+y3+y4+......+yn-1)] or h/2[(X)+2*R]; Where X =y0+y1 R= y1+y2+y3+........................yn-1 Trapezoidal Rule using C programming : #include<stdio.h> int main() { int n,i,j; printf("Enter the total Number of Input You want"); scanf("%d",&n); float x[n],y[n],h,sum; sum=0; for(i=0;i<n;i++) { printf("Enter the value of X[%d] : ",i); scanf("%f",&x[i]); } for(i=0;i<n;i++) {...
Comments
Post a Comment