Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- # include <stdlib.h>
- # include <math.h>
- int main(void)
- {
- double x0 = 1., y0 = 2. ,z0 =3.;
- double x1,y1,z1;
- double t = 0., dt =0.01;
- int i,n=1000;
- FILE * A;
- A = fopen("al.txt","w");
- x1=x0;
- y1=y0;
- z1=z0;
- for(i=0;i<n;i++)
- {
- fprintf(A,"%lf %lf %lf\n",x1,y1,z1);
- x1 = x0 + dt*(10.)*(y0-x0);
- y1 = y0 + dt*(x0 *(28. - z0) - y0);
- z1 = z0 +dt*(x0*y0 - (8/3)*z0);
- x0=x1;
- y0=y1;
- z0=z1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement