Lagrange's Interpolation Formula : #include<stdio.h> int main() { int i,j,n,o; printf("Enter the value of n"); scanf("%d",&n); float x[n],y[n],u,d,w,r; for(i=0;i<n;i++) { printf("Enter the value of x[%d]",i); scanf("%f",&x[i]); } for(i=0;i<n;i++) { printf("Enter the value of y[%d]",i); scanf("%f",&y[i]); } r=0; printf("Enter the number whose approximate value you want"); scanf("%f",&w); for(i=0;i<n;i++) { u=d=1; for(j=0;j<n;j++) { ...
Comments
Post a Comment