Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- double b1 = 0.5, b2 = 0.2, b;
- int n;
- cin >> n;
- for (int i = 3; i <= n; i++) {
- b = (pow(b2, 2) + b1 / (i-1));
- b1 = b2;
- b2 = b;
- cout << "i = " << i << " "<< b << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement