daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # include <stdio.h>
  2. # include <stdlib.h>
  3. # include <math.h>
  4.  
  5. int main(void)
  6. {
  7.     double x0 = 1., y0 = 2. ,z0 =3.;
  8.     double x1,y1,z1;
  9.     double t = 0., dt =0.01;
  10.     int i,n=1000;
  11.    
  12.     FILE * A;
  13.     A = fopen("al.txt","w");
  14.     x1=x0;
  15.     y1=y0;
  16.     z1=z0;
  17.     for(i=0;i<n;i++)
  18.     {
  19.         fprintf(A,"%lf %lf %lf\n",x1,y1,z1);
  20.         x1 = x0 + dt*(10.)*(y0-x0);
  21.         y1 = y0 + dt*(x0 *(28. - z0) - y0);
  22.         z1 = z0 +dt*(x0*y0 - (8/3)*z0);
  23.         x0=x1;
  24.         y0=y1;
  25.         z0=z1;
  26.     }
  27.     return 0;
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top