Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int ciag(int n)
- {
- if(n == 0)
- {
- return 2;
- }
- else if( n == 1)
- {
- return 1;
- }
- else
- {
- return 2/(2+ (ciag(n-1)*ciag(n-2)) );
- }
- }
- int main()
- {
- int x = ciag(1);
- cout<<x;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement