diff --git a/Recursion/P27_All_Sorted.cpp b/Recursion/P27_All_Sorted.cpp new file mode 100644 index 0000000..804415f --- /dev/null +++ b/Recursion/P27_All_Sorted.cpp @@ -0,0 +1,9 @@ +//For a,b,c we have sort abc acb bac bca cab cba(6 kinds) This Program is to sort all of the kinds +#include + +using namespace std; + +int main() { + + return 0; +} \ No newline at end of file diff --git a/Recursion/P28_19_n!.cpp b/Recursion/P28_19_n!.cpp new file mode 100644 index 0000000..8096865 --- /dev/null +++ b/Recursion/P28_19_n!.cpp @@ -0,0 +1,12 @@ +#include +using namespace std; +int jc(int n){ + if(n > 0) + return jc(n - 1)*n; + return 1; +} + +int main(){ + cout << jc(10) << endl; + return 0; +} diff --git a/Recursion/P28_19_n!.exe b/Recursion/P28_19_n!.exe new file mode 100644 index 0000000..e6d5ae3 Binary files /dev/null and b/Recursion/P28_19_n!.exe differ diff --git a/Recursion/P28_20_Feb.cpp b/Recursion/P28_20_Feb.cpp new file mode 100644 index 0000000..61efc33 --- /dev/null +++ b/Recursion/P28_20_Feb.cpp @@ -0,0 +1,15 @@ +#include +using namespace std; + +int feb(int n){ + if(n > 1) + return feb(n - 1) + feb(n - 2); + return 1; +} + +int main(){ + for(int i = 1;i < 10; i++){ + cout << feb(i) << endl; + } + return 0; +} diff --git a/Recursion/P28_20_Feb.exe b/Recursion/P28_20_Feb.exe new file mode 100644 index 0000000..b766ac9 Binary files /dev/null and b/Recursion/P28_20_Feb.exe differ diff --git a/Recursion/P29_21_ComplexFunc.cpp b/Recursion/P29_21_ComplexFunc.cpp new file mode 100644 index 0000000..d405aa7 --- /dev/null +++ b/Recursion/P29_21_ComplexFunc.cpp @@ -0,0 +1,14 @@ +#include +using namespace std; + +int cf(int n){ + if(n%2 == 1) + return cf(3*n + 1); + if(n%2 == 0) + return n / 2; +} + +int main(){ + cout << cf(5) << " "<< cf(6) << " " << cf(7) << endl; + return 0; +} diff --git a/Recursion/P29_21_ComplexFunc.exe b/Recursion/P29_21_ComplexFunc.exe new file mode 100644 index 0000000..431a577 Binary files /dev/null and b/Recursion/P29_21_ComplexFunc.exe differ diff --git a/Recursion/P29_22_Ackermann.cpp b/Recursion/P29_22_Ackermann.cpp new file mode 100644 index 0000000..8431d9c --- /dev/null +++ b/Recursion/P29_22_Ackermann.cpp @@ -0,0 +1,6 @@ +#include +using namespace std; +int main(){ + + return 0; +} diff --git a/Recursion/Resursion 递归 b/Recursion/Resursion 递归 new file mode 100644 index 0000000..e69de29 diff --git a/Recursion/新建 文本文档.txt b/Recursion/新建 文本文档.txt new file mode 100644 index 0000000..e69de29