-
20.
0anasını gibeyim nasıl bir dildir bu
-
19.
0doğru yer yok ki düzeltek godoş
-
18.
0c ödevin var yardım edin zütleeeeeeeeer" hakkında kafanızda bir tanım veya verebileceğiniz bir örnek varsa eklemekten çekinmeyin:
-
17.
0output:ccc 40 yapar ccc
-
16.
0amina koim bu hata vermesinde ben mi veriim. salla odevi git bi cavus tokatla sen..
-
15.
0olum bu çok önemli lan biriniz yardım edin ankaradan olan varsa bira ısmarlarım.
-
14.
0sadece programı çalısır hale getircemmm şimdilik.. hataları halletmem laızm. bir sürü hata veriorrrr
-
13.
0soru nerde bulamadım
-
12.
0yardım helppp meeeee
-
11.
0@9 evet işte çalısır hale getirmem lazın valla ocanıza düştüm bi yardım edin =( bu ödevi yapamazsam kalıorm salı günü son aq.
-
10.
+1özet geç lan bin
-
9.
0lan derledim anasının amı kadar hata verdi.
-
8.
0tam hali şu beylerrrrrTümünü Göster
/*
---
Algo9-4.c C program for implementing Algorithm 9.4
Algorithm translated to C by: Dr. Norman Fahrer
IBM and Macintosh verification by: Daniel Mathews
NUMERICAL METHODS: C Programs, (c) John H. Mathews 1995
To accompany the text:
NUMERICAL METHODS for Mathematics, Science and Engineering, 2nd Ed, 1992
Prentice Hall, Englewood Cliffs, New Jersey, 07632, U.S.A.
Prentice Hall, Inc.; USA, Canada, Mexico ISBN 0-13-624990-6
Prentice Hall, International Editions: ISBN 0-13-625047-5
This free software is compliments of the author.
E-mail address: in%"mathews@fullerton.edu"
Algorithm 9.4 (Runge-Kutta Method of Order 4).
Section 9.5, Runge-Kutta Methods, Page 460
---
• /
/*
---
Algorithm 9.4 (Runge-Kutta Method of Order 4).
To approximate the solution of the initial value problem y' = f(t,y)
with y(a) = y_0 over [a,b] by using the formula
h
y_(k+1) = y_k + --- [K_1 + 2*K_2 + 2*K_3 + K_4]
6
User has to supply functions named : ffunction
An example is included in this program.
---
• /
5. include<stdio.h>
6. include<stdlib.h>
7. include<math.h>
8. define MAX 500
/* define prototype for USER-SUPPLIED function f(x) */
double ffunction(double t, double y);
/* EXAMPLE for "f1function" */
double ffunction(double t, double y)
{
return ( (t - y) / 2.0 );
}
/* --- */
/* Main program for algorithm 9.4 */
void main(void)
{
int J; /* Loop counter */
int M; /* INPUT: Number of steps */
double A, B, Y[MAX]; /* Endpoints and inital value */
double H; /* Compute the step size */
double T[MAX];
double K1, K2, K3, K4; /* Function values */
double t, y;
printf("--- Taylor's Method ---n");
printf("--- Example 9.10 on page 454 ---n");
printf("---n");
printf("Please enter endpoints of the interval [A,B]:n");
printf("For used Example type : 0, 3n");
scanf("%lf, %lf", &A, &B);
printf("You entered [%lf, %lf]n", A, B);
printf("---n");
printf("Please enter number of steps: (Not more than 500 !)n");
scanf("%d",&M);
if(M > MAX)
{
printf(" Not prepared for more than %d steps. Terminating. Sorryn",MAX);
exit(0);
}
printf("---n");
printf("Please enter initial value Y[0] :n");
printf("For used Example type : 1n");
scanf("%lf", &Y[0]);
printf("You entered Y[0] = %lfn", Y[0]);
/* Compute the step size */
H = (B - A) / M;
/* Initialize the variable */
T[0] = A;
for(J = 0; J <= M-1; J++)
{
t = T[J];
y = Y[J];
K1 = H * ffunction(t,y);
K2 = H * ffunction(t + H/2.0, y + 0.5 * K1);
K3 = H * ffunction(t + H/2.0, y + 0.5 * K2);
K4 = H * ffunction(t + H, y + K3);
Y[J+1] = y + ( K1 + 2.0 * K2 + 2.0 * K3 + K4 ) / 6.0;
T[J+1] = A + H * (J+1);
}
/* Output */
for ( J = 0; J <= M; J++)
{
printf("J = %d, T[J] = %lf, Y[J] = %lfn", J, T[J], Y[J]);
}
} /* End of main program */ -
7.
0beyler program çalsıyo mu sizde? nası ççalıstırdınız. çalısan şekşlini gönderirmisiniz bi yardım edin gurban oluyummm
-
6.
0itülüysen ederim değilsen etmem
-
5.
0dingil soruyu yazsana önce
-
4.
0bilmiyorum ki =( çalıstıramadım aq.
-
3.
0output : 40 yapar
-
2.
0sonuç kaç lan 40 mı?
-
1.
0c++ dan ödevim var ugras ugras yapamıyom biriniz çalıstırın lan ipneler yardım edin hiç anlamıyorum aq...
9. include<stdio.h>
10. include<stdlib.h>
11. include<math.h>
12. define MAX 500
/* define prototype for USER-SUPPLIED function f(x) */
double ffunction(double t, double y);
/* EXAMPLE for "f1function" */
double ffunction(double t, double y)
{
return ( (t - y) / 2.0 );
}
int J; /* Loop counter */
int M; /* INPUT: Number of steps */
double A, B, Y[MAX]; /* Endpoints and inital value */
double H; /* Compute the step size */
double T[MAX];
double K1, K2, K3, K4; /* Function values */
double t, y;
{
printf("--- Taylor's Method ---n");
printf("--- Example 9.10 on page 454 ---n");
printf("---n");
printf("Please enter endpoints of the interval [A,B]:n");
printf("For used Example type : 0, 3n");
scanf("%lf, %lf", &A, &B);
printf("You entered [%lf, %lf]n", A, B);
printf("---n");
printf("Please enter number of steps: (Not more than 500 !)n");
scanf("%d",&M);
if(M > MAX)
{
printf(" Not prepared for more than %d steps. Terminating. Sorryn",MAX);
exit(0);
}
printf("---n");
printf("Please enter initial value Y[0] :n");
printf("For used Example type : 1n");
scanf("%lf", &Y[0]);
printf("You entered Y[0] = %lfn", Y[0]);
/* Compute the step size */
H = (B - A) / M;
/* Initialize the variable */
T[0] = A;
for(J = 0; J <= M-1; J++)
{
t = T[J];
y = Y[J];
K1 = H * ffunction(t,y);
K2 = H * ffunction(t + H/2.0, y + 0.5 * K1);
K3 = H * ffunction(t + H/2.0, y + 0.5 * K2);
K4 = H * ffunction(t + H, y + K3);
Y[J+1] = y + ( K1 + 2.0 * K2 + 2.0 * K3 + K4 ) / 6.0;
T[J+1] = A + H * (J+1);
}
/* Output */
for ( J = 0; J <= M; J++)
{
printf("J = %d, T[J] = %lf, Y[J] = %lfn", J, T[J], Y[J]);
}
-
su tatliliga bakinnn
-
para suyunu cekince kutsalsuku
-
ülkeye şeriatı getirecek yegane adam kayradır
-
umit ozdaga oy verdik sonuc bu
-
elektrik faturasi 977 gelmis
-
14 mayis 2023 te vefat ettim
-
sözlüğün oeleri daha gelmemiş
-
hiçbir şey olmasa bile kesinlikle bir şeyler olduu
-
hanim su mutlak budlanı firina koy
-
madem reenkarnasyon var neden
-
souki reis o zinciri çıkar
-
zincirle gitcem kudurun
-
rasat bile online
-
burası artık cok acınası bıyer oldu karınca
-
yeni araştırmaya göre beyin de yağ yakıyor
-
kufurbazgocmar
-
sozluktekı paralı troller cıddı baslık
-
ciğerlerim yanıyor şarapsızım
-
sile sile adam birakmadiniz konusacak
-
kaç yaşında adamsın babandan 200 lira almak
-
insta videosunun linkini paylaşınca
- / 1