Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double num(int n);
- int main()
- {
- std::cout << "Wyraz 126 ciagu "<<num(126);
- }
- double num(int n) {
- if(n==1)
- return 1;
- if(n==2)
- return 0.5;
- return -num(n-1)*num(n-2);
- }
Advertisement
Add Comment
Please, Sign In to add comment