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)
Phương pháp Runge-Kutta  EmptyThu Aug 23, 2012 5:38 am by Admin

» Tuyệt kỹ cua giai
Phương pháp Runge-Kutta  EmptyThu Aug 23, 2012 5:36 am by Admin

» NETCAT.........
Phương pháp Runge-Kutta  EmptyMon Aug 13, 2012 6:35 am by Admin

» Bảo mật CSDL bằng phương pháp mã hóa.
Phương pháp Runge-Kutta  EmptyTue Apr 17, 2012 10:04 pm by Admin

» Hàm mã hóa MD5 bằng JavaScript
Phương pháp Runge-Kutta  EmptyTue Apr 17, 2012 10:03 pm by Admin

» Giá của món quà
Phương pháp Runge-Kutta  EmptyFri Apr 13, 2012 6:01 am by Admin

» Sẽ chỉ yêu ai?
Phương pháp Runge-Kutta  EmptyFri Apr 13, 2012 6:01 am by Admin

» Cách đọc bảng chữ cái!
Phương pháp Runge-Kutta  EmptyThu Apr 12, 2012 10:37 pm by Admin

» Gắn trojan, keylog, virus vào website, forum
Phương pháp Runge-Kutta  EmptyTue Apr 10, 2012 1:14 am by Admin

Affiliates
free forum


Phương pháp Runge-Kutta

Go down

Phương pháp Runge-Kutta  Empty Phương pháp Runge-Kutta

Post  Admin Thu Jun 09, 2011 3:01 am

//Phuong phap Runge-Kutta
#include <stdio.h>
#include <conio.h>

float f(float x,float y)
{
return x+y;
}
void main()
{
float a,b,y0;
int n;
float h;
int i;
float x***91;100***93;,y***91;100***93;;
float k1,k2,k3,k4;

clrscr();
printf("Giai phuong trinh vi phan:");
printf("\ny'=x+y");
printf("\n");

printf("\na=");
scanf("%f",&a);

printf("\nb=");
scanf("%f",&b);

printf("\ny0=");
scanf("%f",&y0);

printf("\nn=");
scanf("%d",&n);

getch();
clrscr();

printf("Bang ket qua:");
printf("\nx0=%f",a);
printf("\ty0=%f",y0);
printf("\n");

h=(b-a)/n;
x***91;0***93;=a;
y***91;0***93;=y0;

for (i=1;i<=n;i++)
{
x***91;i***93;=x***91;i-1***93;+h;
k1=h*f(x***91;i-1***93;,y***91;i-1***93;);
k2=h*f(x***91;i-1***93;+h/2,y***91;i-1***93;+k1/2);
k3=h*f(x***91;i-1***93;+h/2,y***91;i-1***93;+k2/2);
k4=h*f(x***91;i-1***93;+h,y***91;i-1***93;+k3);
y***91;i***93;=y***91;i-1***93;+(k1+2*k2+2*k3+k4)/6;

printf("\nx%d=%f",i,x***91;i***93;);
printf("\ty%d=%f",i,y***91;i***93;);
printf("\n");
}

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

- Similar topics

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