answersLogoWhite

0


Best Answer

#include<stdio.h> #include<conio.h> #include<math.h> void

main() { float

x[10],y[10],temp=1,f[10],sum,p; int

i,n,j,k=0,c; clrscr(); printf("\nhow many record you will be enter: "

); scanf("%d"

,&n); for

(i=0; i<n; i++) { printf("\n\nenter the value of x%d: "

,i); scanf("%f"

,&x[i]); printf("\n\nenter the value of f(x%d): "

,i); scanf("%f"

,&y[i]); } printf("\n\nEnter X for finding f(x): "

); scanf("%f"

,&p); for

(i=0;i<n;i++) { temp = 1; k = i; for

(j=0;j<n;j++) { if

(k==j) { continue

; } else

{ temp = temp * ((p-x[j])/(x[k]-x[j])); } } f[i]=y[i]*temp; } for

(i=0;i<n;i++) { sum = sum + f[i]; } printf("\n\n f(%.1f) = %f "

,p,sum); getch(); }

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c programme to perform Lagrange's interpolation formula?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which types of task can perform in the edit can you make the program in it?

you can perform in the edit prompt? can we make the programme in it?


Which type of task you can perform in the EDIT prompt can we make the program in it.?

you can perform in the edit prompt? can we make the programme in it?


Which types of task you can perform in the edit prompt can we make the program in it?

you can perform in the edit prompt? can we make the programme in it?


How to perform 2-D separable Interpolation by zero-order function to a 2D image?

This might be a 2D image of what you want. Refer to the related link showing 2d magnetic fields.


What is system application?

its somethinmg to do with windows and powerpoint and exel


What is utility programme in a computer?

Programmes in computer are step by step instructions that are design to enble the computer operate and perform a specific task


Clear idea about software?

a software is a set of different programmes logically related to each other. a programme is a set of instructions written to perform a specific task..... a software is made to solve or to perform a particular function or task.


Write a programme to perform binary operations on integer argument The arguments and operators should be accepted using command line parameters?

There are many different operators, which are you referring to?


What consists of cell references numbers and arithmetic operators that instruct Excel to perform a calculation?

A formula.


What are some words with the Latin root form?

formula, formation, reform, deform, perform, transform


What is a Summary formula?

A Summary formula is a formula in Salesforce that allows users to calculate aggregate values (like Sum, Average, Min, Max) on a grouped set of records in a report. It can be used to perform calculations on data to generate summary information for reports and dashboards.


What is a formula that can perform more than one calculation at a time?

Many formulas can perform more than one calculation at a time. A simple example for Excel is =SUM(A1:A12,B14:B23,D6:D32) .