Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7.     int i;
  8.     double x[10];
  9.    
  10.     x[0] = 1;
  11.     x[1] = 0.3;
  12.    
  13.     for (i = 2; i <= 9; ++i)
  14.     {
  15.         x[i] = (i + 2) * x[i - 2];
  16.         cout << "x[" << i << "] = " << x[i] << endl;
  17.         }
  18.    
  19.     getch ();
  20.     return 0;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement