HACKIS - Hacking Internet Security
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Tuyệt Kỹ Đong Giai Chân Kinh (tuyệt Kỹ cua trai)
Nội suy Lagrange EmptyThu Aug 23, 2012 5:38 am by Admin

» Tuyệt kỹ cua giai
Nội suy Lagrange EmptyThu Aug 23, 2012 5:36 am by Admin

» NETCAT.........
Nội suy Lagrange EmptyMon Aug 13, 2012 6:35 am by Admin

» Bảo mật CSDL bằng phương pháp mã hóa.
Nội suy Lagrange EmptyTue Apr 17, 2012 10:04 pm by Admin

» Hàm mã hóa MD5 bằng JavaScript
Nội suy Lagrange EmptyTue Apr 17, 2012 10:03 pm by Admin

» Giá của món quà
Nội suy Lagrange EmptyFri Apr 13, 2012 6:01 am by Admin

» Sẽ chỉ yêu ai?
Nội suy Lagrange EmptyFri Apr 13, 2012 6:01 am by Admin

» Cách đọc bảng chữ cái!
Nội suy Lagrange EmptyThu Apr 12, 2012 10:37 pm by Admin

» Gắn trojan, keylog, virus vào website, forum
Nội suy Lagrange EmptyTue Apr 10, 2012 1:14 am by Admin

Affiliates
free forum


Nội suy Lagrange

Go down

Nội suy Lagrange Empty Nội suy Lagrange

Post  Admin Thu Jun 09, 2011 3:04 am

//Noi suy Lagrange
http://Noisuy.cpp
#include <conio.h>
#include <iostream.h>
#define N 100

class BANGSO
{
private:
float x***91;N***93;;
float y***91;N***93;;
int n;
public:
void nhap_so_lieu();
void noi_suy(float);
};

void BANGSO::nhap_so_lieu()
{
cout << "So moc noi suy:";
cin >> n;
while (n>N)
{
cout <<"So ban nhap qua lon!Hay nhap so khac:";
cin >> n;
}

cout <<"Bat dau nhap so lieu vao bang!"<<endl;
getch();

for (int i=0;i<=n-1;i++)
{
cout <<'x' << i<<'=';
cin >>x***91;i***93;;

cout << 'y' << i << '=';
cin >> y***91;i***93;;
}
cout << "Da nhap xong so lieu vao bang!" << endl;
getch();

}

void BANGSO::noi_suy(float c)
{
float l***91;N***93;;
for (int i=0;i<=n-1;i++)
{
l***91;i***93;=1;
for (int j=0;j<=n-1;j++)
{
if (i==j)
continue;
else
l***91;i***93;*=(c-x***91;j***93;)/(x***91;i***93;-x***91;j***93;);
}
}

float kq=0;
for (i=0;i<=n-1;i++)
{
kq+=y***91;i***93;*l***91;i***93;;
}

cout << "KQ: " << kq;
getch();
}

void main()
{
float c;
BANGSO bang1;
clrscr();
bang1.nhap_so_lieu();
cout<<"nhap c=";
cin >>c;
bang1.noi_suy(c);
getch();
}
Admin
Admin
Admin

Tổng số bài gửi : 782
Join date : 2009-08-15

https://hackis.forumvi.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum