Created
February 27, 2017 20:13
-
-
Save marcin119a/802d9b25e832e10f5caad77a213a7fc8 to your computer and use it in GitHub Desktop.
Revisions
-
marcin119a created this gist
Feb 27, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #include <iostream> int pell(int n) { int n2 = 2, n1 = 2; for(int i=0;i<n;i++) { n1 = n2; n2 = n1 * 2 + n2; } return n2; } int main() { int n = 10; pell(10); std::cout << pell(10) << " " << std::endl; return 0; }