From d1429981e4c58df48e2285b96ebe727237695d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Mon, 12 Mar 2018 23:11:36 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86runningletter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- level1/p01_runningLetter/main.sln | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 level1/p01_runningLetter/main.sln diff --git a/level1/p01_runningLetter/main.sln b/level1/p01_runningLetter/main.sln new file mode 100644 index 00000000..b894060e --- /dev/null +++ b/level1/p01_runningLetter/main.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2002 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "大佬跑程序", "大佬跑程序\大佬跑程序.vcxproj", "{BFF098E7-97CC-4994-BD93-BC8937858022}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x64.ActiveCfg = Debug|x64 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x64.Build.0 = Debug|x64 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x86.ActiveCfg = Debug|Win32 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x86.Build.0 = Debug|Win32 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x64.ActiveCfg = Release|x64 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x64.Build.0 = Release|x64 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x86.ActiveCfg = Release|Win32 + {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E899BAE2-E4A0-46DA-A2D1-0B3E1BDF023D} + EndGlobalSection +EndGlobal From d9c88cfe077fc8a24253e0496f923d41e79cd183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Mon, 12 Mar 2018 23:16:45 +0800 Subject: [PATCH 02/12] update running letter --- level1/p01_runningLetter/main.sln | 63 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/level1/p01_runningLetter/main.sln b/level1/p01_runningLetter/main.sln index b894060e..7e9a8f1c 100644 --- a/level1/p01_runningLetter/main.sln +++ b/level1/p01_runningLetter/main.sln @@ -1,31 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2002 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "大佬跑程序", "大佬跑程序\大佬跑程序.vcxproj", "{BFF098E7-97CC-4994-BD93-BC8937858022}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x64.ActiveCfg = Debug|x64 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x64.Build.0 = Debug|x64 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x86.ActiveCfg = Debug|Win32 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Debug|x86.Build.0 = Debug|Win32 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x64.ActiveCfg = Release|x64 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x64.Build.0 = Release|x64 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x86.ActiveCfg = Release|Win32 - {BFF098E7-97CC-4994-BD93-BC8937858022}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E899BAE2-E4A0-46DA-A2D1-0B3E1BDF023D} - EndGlobalSection -EndGlobal +#include +#include +#include + +int main() +{ + for (int j = 1; j < 60; j++) + { + + Sleep(100); + system("cls"); + for (int i = 0; i < j;i++) + { + printf(" "); + } + printf("abcdefg"); + } + + for (int j = 60; j > 1; j--) + { + + Sleep(100); + system("cls"); + for (int i = 1; i < j; i++) + { + printf(" "); + } + printf("abcdefg"); + } + getchar(); + return 0; +} From 0b12dca9185d88ad346faba771c66ade005d689a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Tue, 13 Mar 2018 09:49:27 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86is=5Fprime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- level1/p02_isPrime/finished_is_prime | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 level1/p02_isPrime/finished_is_prime diff --git a/level1/p02_isPrime/finished_is_prime b/level1/p02_isPrime/finished_is_prime new file mode 100644 index 00000000..70dd062d --- /dev/null +++ b/level1/p02_isPrime/finished_is_prime @@ -0,0 +1,18 @@ +#include +#include +#include +int main() +{ + int i,n,k,j; + scanf("%d",&n); + k=n/2; + for(i=2;i Date: Mon, 19 Mar 2018 08:17:50 +0800 Subject: [PATCH 04/12] Hanoi --- level1/Hanoi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 level1/Hanoi diff --git a/level1/Hanoi b/level1/Hanoi new file mode 100644 index 00000000..cf4527b7 --- /dev/null +++ b/level1/Hanoi @@ -0,0 +1,30 @@ +#include +void Move(int n,char a,char b); +void Hanoi(int n,char a,char b,char c) +{ + if (n==1) + { + Move(n,a,c); + } + else + { + Hanoi(n-1,a,c,b); + Move(n,a,c); + Hanoi(n-1,b,a,c); + } +} +int x; +void Move(int n,char a,char b) +{ + x++; + printf("The %d step: Move No.%d dish from %c post to %c post \n" ,x,n,a,b); +} +int main() +{ + int n; + printf("Please input the number of floor:\n"); + scanf(" %d",&n); + Hanoi(n, 'A', 'B', 'C'); + return 0; +} + From b5bab603f418b07332bbda8f4a8ace1eed459ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Mon, 19 Mar 2018 08:20:44 +0800 Subject: [PATCH 05/12] Delete Hanoi --- level1/Hanoi | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 level1/Hanoi diff --git a/level1/Hanoi b/level1/Hanoi deleted file mode 100644 index cf4527b7..00000000 --- a/level1/Hanoi +++ /dev/null @@ -1,30 +0,0 @@ -#include -void Move(int n,char a,char b); -void Hanoi(int n,char a,char b,char c) -{ - if (n==1) - { - Move(n,a,c); - } - else - { - Hanoi(n-1,a,c,b); - Move(n,a,c); - Hanoi(n-1,b,a,c); - } -} -int x; -void Move(int n,char a,char b) -{ - x++; - printf("The %d step: Move No.%d dish from %c post to %c post \n" ,x,n,a,b); -} -int main() -{ - int n; - printf("Please input the number of floor:\n"); - scanf(" %d",&n); - Hanoi(n, 'A', 'B', 'C'); - return 0; -} - From e74b3f9c7dd31fbd9b20255d144867440f78e6fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Mon, 19 Mar 2018 08:21:13 +0800 Subject: [PATCH 06/12] Add files via upload --- level1/main.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 level1/main.c diff --git a/level1/main.c b/level1/main.c new file mode 100644 index 00000000..cf4527b7 --- /dev/null +++ b/level1/main.c @@ -0,0 +1,30 @@ +#include +void Move(int n,char a,char b); +void Hanoi(int n,char a,char b,char c) +{ + if (n==1) + { + Move(n,a,c); + } + else + { + Hanoi(n-1,a,c,b); + Move(n,a,c); + Hanoi(n-1,b,a,c); + } +} +int x; +void Move(int n,char a,char b) +{ + x++; + printf("The %d step: Move No.%d dish from %c post to %c post \n" ,x,n,a,b); +} +int main() +{ + int n; + printf("Please input the number of floor:\n"); + scanf(" %d",&n); + Hanoi(n, 'A', 'B', 'C'); + return 0; +} + From fa6b475915a3198756106926d74a71d41cf27a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Mon, 19 Mar 2018 08:21:58 +0800 Subject: [PATCH 07/12] Rename main.c to hanoi.c --- level1/{main.c => hanoi.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename level1/{main.c => hanoi.c} (100%) diff --git a/level1/main.c b/level1/hanoi.c similarity index 100% rename from level1/main.c rename to level1/hanoi.c From 49d997ea3b0e34eb6bd426ed1e0ed579a7ac79d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Tue, 20 Mar 2018 08:26:47 +0800 Subject: [PATCH 08/12] Update and rename README.md to hanoi.md --- level1/p08_hanoi/README.md | 5 ----- level1/p08_hanoi/hanoi.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) delete mode 100755 level1/p08_hanoi/README.md create mode 100755 level1/p08_hanoi/hanoi.md diff --git a/level1/p08_hanoi/README.md b/level1/p08_hanoi/README.md deleted file mode 100755 index 859be942..00000000 --- a/level1/p08_hanoi/README.md +++ /dev/null @@ -1,5 +0,0 @@ -### 功能要求: - -1.汉诺塔:汉诺塔(又称河内塔)问题是源于印度一个古老传说的益智玩具。大梵天创造世界的时候做了三根金刚石柱子,在一根柱子上从下往上按照大小顺序摞着64片黄金圆盘。大梵天命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,在三根柱子之间一次只能移动一个圆盘。 - -![](./hanoi.jpg) \ No newline at end of file diff --git a/level1/p08_hanoi/hanoi.md b/level1/p08_hanoi/hanoi.md new file mode 100755 index 00000000..019c628b --- /dev/null +++ b/level1/p08_hanoi/hanoi.md @@ -0,0 +1,32 @@ +### 功能要求: + +1.汉诺塔:汉诺塔(又称河内塔)问题是源于印度一个古老传说的益智玩具。大梵天创造世界的时候做了三根金刚石柱子,在一根柱子上从下往上按照大小顺序摞着64片黄金圆盘。大梵天命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,在三根柱子之间一次只能移动一个圆盘。 +#include +void Move(int n,char a,char b); +void Hanoi(int n,char a,char b,char c) +{ + if (n==1) + { + Move(n,a,c); + } + else + { + Hanoi(n-1,a,c,b); + Move(n,a,c); + Hanoi(n-1,b,a,c); + } +} +int x; +void Move(int n,char a,char b) +{ + x++; + printf("The %d step: Move No.%d dish from %c post to %c post \n" ,x,n,a,b); +} +int main() +{ + int n; + printf("Please input the number of floor:\n"); + scanf(" %d",&n); + Hanoi(n, 'A', 'B', 'C'); + return 0; +} From bd720074e0ca1e6849be087a13d7f2e84891d6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Tue, 20 Mar 2018 08:30:46 +0800 Subject: [PATCH 09/12] Create hanoi --- level1/p08_hanoi/hanoi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 level1/p08_hanoi/hanoi diff --git a/level1/p08_hanoi/hanoi b/level1/p08_hanoi/hanoi new file mode 100644 index 00000000..954fb6df --- /dev/null +++ b/level1/p08_hanoi/hanoi @@ -0,0 +1,29 @@ +#include +void Move(int n,char a,char b); +void Hanoi(int n,char a,char b,char c) +{ + if (n==1) + { + Move(n,a,c); + } + else + { + Hanoi(n-1,a,c,b); + Move(n,a,c); + Hanoi(n-1,b,a,c); + } +} +int x; +void Move(int n,char a,char b) +{ + x++; + printf("The %d step: Move No.%d dish from %c post to %c post \n" ,x,n,a,b); +} +int main() +{ + int n; + printf("Please input the number of floor:\n"); + scanf(" %d",&n); + Hanoi(n, 'A', 'B', 'C'); + return 0; +} From d3edbc1ea76eb30370102f2b432f052d0a2fe6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Wed, 21 Mar 2018 18:43:15 +0800 Subject: [PATCH 10/12] =?UTF-8?q?Create=20=E6=B0=B4=E4=BB=99=E8=8A=B1?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...6\260\264\344\273\231\350\212\261\346\225\260" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "level1/p04_ narcissus/\346\260\264\344\273\231\350\212\261\346\225\260" diff --git "a/level1/p04_ narcissus/\346\260\264\344\273\231\350\212\261\346\225\260" "b/level1/p04_ narcissus/\346\260\264\344\273\231\350\212\261\346\225\260" new file mode 100644 index 00000000..ebcd8912 --- /dev/null +++ "b/level1/p04_ narcissus/\346\260\264\344\273\231\350\212\261\346\225\260" @@ -0,0 +1,15 @@ +#include +int main() +{ + int a,b,c,i; + for(i=100;i<1000;i++) + { + a = i % 10; + b = ((i - a) / 10) % 10; + c = (i - a - 10 * b) / 100; + if ((a * a * a + b * b * b + c * c * c) == i) + printf("%d ", i); + } + return 0; + +} From 98f326db3b80326b9021c900af8c66f94c56f02e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=86=80=E9=B9=8F?= <37091248+Jipeng416@users.noreply.github.com> Date: Tue, 27 Mar 2018 09:08:02 +0800 Subject: [PATCH 11/12] Create Finished_Goldbach --- level1/p06_Goldbach/Finished_Goldbach | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 level1/p06_Goldbach/Finished_Goldbach diff --git a/level1/p06_Goldbach/Finished_Goldbach b/level1/p06_Goldbach/Finished_Goldbach new file mode 100644 index 00000000..b086777c --- /dev/null +++ b/level1/p06_Goldbach/Finished_Goldbach @@ -0,0 +1,26 @@ +#include +#include +#include +int prime(int x) +{ + int i; + for(i=2;i Date: Sun, 1 Apr 2018 21:13:52 +0800 Subject: [PATCH 12/12] Create encrypt --- level1/p07_encrypt_decrypt/encrypt | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 level1/p07_encrypt_decrypt/encrypt diff --git a/level1/p07_encrypt_decrypt/encrypt b/level1/p07_encrypt_decrypt/encrypt new file mode 100644 index 00000000..1417b4a3 --- /dev/null +++ b/level1/p07_encrypt_decrypt/encrypt @@ -0,0 +1,31 @@ +#include +#include +#include +void encry(char *inpute,unsigned long n) +{ + for(int i=0;i