diff --git a/Code-C++/P1/shun1.sdf b/Code-C++/P1/shun1.sdf new file mode 100644 index 0000000..486a57a Binary files /dev/null and b/Code-C++/P1/shun1.sdf differ diff --git a/Code-C++/P1/shun1.sln b/Code-C++/P1/shun1.sln new file mode 100644 index 0000000..2e1166d --- /dev/null +++ b/Code-C++/P1/shun1.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shun1", "shun1\shun1.vcxproj", "{8AD4350A-4E55-4D6D-993C-D77D53A2A3F1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8AD4350A-4E55-4D6D-993C-D77D53A2A3F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {8AD4350A-4E55-4D6D-993C-D77D53A2A3F1}.Debug|Win32.Build.0 = Debug|Win32 + {8AD4350A-4E55-4D6D-993C-D77D53A2A3F1}.Release|Win32.ActiveCfg = Release|Win32 + {8AD4350A-4E55-4D6D-993C-D77D53A2A3F1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P1/shun1.v11.suo b/Code-C++/P1/shun1.v11.suo new file mode 100644 index 0000000..64d9f0f Binary files /dev/null and b/Code-C++/P1/shun1.v11.suo differ diff --git a/Code-C++/P1/shun1/ReadMe.txt b/Code-C++/P1/shun1/ReadMe.txt new file mode 100644 index 0000000..5829d19 --- /dev/null +++ b/Code-C++/P1/shun1/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:shun1 项目概述 +======================================================================== + +应用程序向导已为您创建了此 shun1 应用程序。 + +本文件概要介绍组成 shun1 应用程序的每个文件的内容。 + + +shun1.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +shun1.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +shun1.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 shun1.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P1/shun1/shun1.cpp b/Code-C++/P1/shun1/shun1.cpp new file mode 100644 index 0000000..494788c --- /dev/null +++ b/Code-C++/P1/shun1/shun1.cpp @@ -0,0 +1,20 @@ +// shun1.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +using namespace std; +int main() +{ + double i; + cout<<"n "; + cin>>i; + double r; + r=1/i; + for(i;i>0;i--) + { + cout< + + + + Debug + Win32 + + + Release + Win32 + + + + {8AD4350A-4E55-4D6D-993C-D77D53A2A3F1} + Win32Proj + shun1 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P1/shun1/shun1.vcxproj.filters b/Code-C++/P1/shun1/shun1.vcxproj.filters new file mode 100644 index 0000000..68fb5f6 --- /dev/null +++ b/Code-C++/P1/shun1/shun1.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P1/shun1/stdafx.cpp b/Code-C++/P1/shun1/stdafx.cpp new file mode 100644 index 0000000..30d4f37 --- /dev/null +++ b/Code-C++/P1/shun1/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// shun1.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P1/shun1/stdafx.h b/Code-C++/P1/shun1/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P1/shun1/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P1/shun1/targetver.h b/Code-C++/P1/shun1/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P1/shun1/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P12/P12.sdf b/Code-C++/P12/P12.sdf new file mode 100644 index 0000000..097610c Binary files /dev/null and b/Code-C++/P12/P12.sdf differ diff --git a/Code-C++/P12/P12.sln b/Code-C++/P12/P12.sln new file mode 100644 index 0000000..a3f6d79 --- /dev/null +++ b/Code-C++/P12/P12.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P12", "P12\P12.vcxproj", "{D434595D-CEB1-4BE2-82B4-E99FCC5D3D67}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D434595D-CEB1-4BE2-82B4-E99FCC5D3D67}.Debug|Win32.ActiveCfg = Debug|Win32 + {D434595D-CEB1-4BE2-82B4-E99FCC5D3D67}.Debug|Win32.Build.0 = Debug|Win32 + {D434595D-CEB1-4BE2-82B4-E99FCC5D3D67}.Release|Win32.ActiveCfg = Release|Win32 + {D434595D-CEB1-4BE2-82B4-E99FCC5D3D67}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P12/P12.v11.suo b/Code-C++/P12/P12.v11.suo new file mode 100644 index 0000000..2a8e419 Binary files /dev/null and b/Code-C++/P12/P12.v11.suo differ diff --git a/Code-C++/P12/P12/P12.cpp b/Code-C++/P12/P12/P12.cpp new file mode 100644 index 0000000..d121f3f --- /dev/null +++ b/Code-C++/P12/P12/P12.cpp @@ -0,0 +1,39 @@ +// P12.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include + #include +using namespace std; + + +int main() +{ + float pCan=0.001; + float pNon=0.999; + float pPosCan=0.8; + float pPosNon=0.1; + float p[2]; + string str; + cin>>str; + if(str=="positive") + { + float p1=pPosCan*pCan; + float p2=pPosNon * pNon; + float P1=p1/(p1+p2); + float P2=p2/(p1+p2); + cout<<"The probability of having cancer given the "< + + + + Debug + Win32 + + + Release + Win32 + + + + {D434595D-CEB1-4BE2-82B4-E99FCC5D3D67} + Win32Proj + P12 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P12/P12/P12.vcxproj.filters b/Code-C++/P12/P12/P12.vcxproj.filters new file mode 100644 index 0000000..af76bfd --- /dev/null +++ b/Code-C++/P12/P12/P12.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P12/P12/ReadMe.txt b/Code-C++/P12/P12/ReadMe.txt new file mode 100644 index 0000000..b7d3b42 --- /dev/null +++ b/Code-C++/P12/P12/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:P12 项目概述 +======================================================================== + +应用程序向导已为您创建了此 P12 应用程序。 + +本文件概要介绍组成 P12 应用程序的每个文件的内容。 + + +P12.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +P12.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +P12.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 P12.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P12/P12/stdafx.cpp b/Code-C++/P12/P12/stdafx.cpp new file mode 100644 index 0000000..19277ab --- /dev/null +++ b/Code-C++/P12/P12/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// P12.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P12/P12/stdafx.h b/Code-C++/P12/P12/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P12/P12/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P12/P12/targetver.h b/Code-C++/P12/P12/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P12/P12/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P13/P13.sdf b/Code-C++/P13/P13.sdf new file mode 100644 index 0000000..585e175 Binary files /dev/null and b/Code-C++/P13/P13.sdf differ diff --git a/Code-C++/P13/P13.sln b/Code-C++/P13/P13.sln new file mode 100644 index 0000000..819fa8a --- /dev/null +++ b/Code-C++/P13/P13.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P13", "P13\P13.vcxproj", "{DCFBBE81-2E5C-4F4B-B6DE-C819276DE288}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCFBBE81-2E5C-4F4B-B6DE-C819276DE288}.Debug|Win32.ActiveCfg = Debug|Win32 + {DCFBBE81-2E5C-4F4B-B6DE-C819276DE288}.Debug|Win32.Build.0 = Debug|Win32 + {DCFBBE81-2E5C-4F4B-B6DE-C819276DE288}.Release|Win32.ActiveCfg = Release|Win32 + {DCFBBE81-2E5C-4F4B-B6DE-C819276DE288}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P13/P13.v11.suo b/Code-C++/P13/P13.v11.suo new file mode 100644 index 0000000..d23d458 Binary files /dev/null and b/Code-C++/P13/P13.v11.suo differ diff --git a/Code-C++/P13/P13/P13.cpp b/Code-C++/P13/P13/P13.cpp new file mode 100644 index 0000000..63dd0c9 --- /dev/null +++ b/Code-C++/P13/P13/P13.cpp @@ -0,0 +1,41 @@ +// P13.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +#include +#include +#include +using namespace std; +double compMean(double *a,double n) +{ + double sum=0; + for(int i=0;i + + + + Debug + Win32 + + + Release + Win32 + + + + {DCFBBE81-2E5C-4F4B-B6DE-C819276DE288} + Win32Proj + P13 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P13/P13/P13.vcxproj.filters b/Code-C++/P13/P13/P13.vcxproj.filters new file mode 100644 index 0000000..1771f48 --- /dev/null +++ b/Code-C++/P13/P13/P13.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P13/P13/ReadMe.txt b/Code-C++/P13/P13/ReadMe.txt new file mode 100644 index 0000000..bacc650 --- /dev/null +++ b/Code-C++/P13/P13/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:P13 项目概述 +======================================================================== + +应用程序向导已为您创建了此 P13 应用程序。 + +本文件概要介绍组成 P13 应用程序的每个文件的内容。 + + +P13.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +P13.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +P13.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 P13.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P13/P13/stdafx.cpp b/Code-C++/P13/P13/stdafx.cpp new file mode 100644 index 0000000..6557009 --- /dev/null +++ b/Code-C++/P13/P13/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// P13.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P13/P13/stdafx.h b/Code-C++/P13/P13/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P13/P13/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P13/P13/targetver.h b/Code-C++/P13/P13/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P13/P13/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P14/P14.sdf b/Code-C++/P14/P14.sdf new file mode 100644 index 0000000..8640fa5 Binary files /dev/null and b/Code-C++/P14/P14.sdf differ diff --git a/Code-C++/P14/P14.sln b/Code-C++/P14/P14.sln new file mode 100644 index 0000000..914b1cb --- /dev/null +++ b/Code-C++/P14/P14.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P14", "P14\P14.vcxproj", "{C1DD0889-5980-44F2-8F10-53323FCC031B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1DD0889-5980-44F2-8F10-53323FCC031B}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1DD0889-5980-44F2-8F10-53323FCC031B}.Debug|Win32.Build.0 = Debug|Win32 + {C1DD0889-5980-44F2-8F10-53323FCC031B}.Release|Win32.ActiveCfg = Release|Win32 + {C1DD0889-5980-44F2-8F10-53323FCC031B}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P14/P14.v11.suo b/Code-C++/P14/P14.v11.suo new file mode 100644 index 0000000..7041508 Binary files /dev/null and b/Code-C++/P14/P14.v11.suo differ diff --git a/Code-C++/P14/P14/P14.cpp b/Code-C++/P14/P14/P14.cpp new file mode 100644 index 0000000..afe1a25 --- /dev/null +++ b/Code-C++/P14/P14/P14.cpp @@ -0,0 +1,47 @@ +// P14.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +#include +#include +#include +using namespace std; +double compMean(double *a,double n) +{ + double sum=0; + for(int i=0;i + + + + Debug + Win32 + + + Release + Win32 + + + + {C1DD0889-5980-44F2-8F10-53323FCC031B} + Win32Proj + P14 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P14/P14/P14.vcxproj.filters b/Code-C++/P14/P14/P14.vcxproj.filters new file mode 100644 index 0000000..94a7e02 --- /dev/null +++ b/Code-C++/P14/P14/P14.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P14/P14/ReadMe.txt b/Code-C++/P14/P14/ReadMe.txt new file mode 100644 index 0000000..472ea7d --- /dev/null +++ b/Code-C++/P14/P14/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:P14 项目概述 +======================================================================== + +应用程序向导已为您创建了此 P14 应用程序。 + +本文件概要介绍组成 P14 应用程序的每个文件的内容。 + + +P14.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +P14.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +P14.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 P14.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P14/P14/stdafx.cpp b/Code-C++/P14/P14/stdafx.cpp new file mode 100644 index 0000000..17c0b47 --- /dev/null +++ b/Code-C++/P14/P14/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// P14.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P14/P14/stdafx.h b/Code-C++/P14/P14/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P14/P14/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P14/P14/targetver.h b/Code-C++/P14/P14/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P14/P14/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P15/P15.sdf b/Code-C++/P15/P15.sdf new file mode 100644 index 0000000..bf26aa6 Binary files /dev/null and b/Code-C++/P15/P15.sdf differ diff --git a/Code-C++/P15/P15.sln b/Code-C++/P15/P15.sln new file mode 100644 index 0000000..ed85369 --- /dev/null +++ b/Code-C++/P15/P15.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P15", "P15\P15.vcxproj", "{84D44900-27A3-45FC-B03B-FE2E51C2236C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {84D44900-27A3-45FC-B03B-FE2E51C2236C}.Debug|Win32.ActiveCfg = Debug|Win32 + {84D44900-27A3-45FC-B03B-FE2E51C2236C}.Debug|Win32.Build.0 = Debug|Win32 + {84D44900-27A3-45FC-B03B-FE2E51C2236C}.Release|Win32.ActiveCfg = Release|Win32 + {84D44900-27A3-45FC-B03B-FE2E51C2236C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P15/P15.v11.suo b/Code-C++/P15/P15.v11.suo new file mode 100644 index 0000000..4223159 Binary files /dev/null and b/Code-C++/P15/P15.v11.suo differ diff --git a/Code-C++/P15/P15/P15.cpp b/Code-C++/P15/P15/P15.cpp new file mode 100644 index 0000000..93b38b3 --- /dev/null +++ b/Code-C++/P15/P15/P15.cpp @@ -0,0 +1,47 @@ +// P15.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +#include +#include +#include +using namespace std; +double compMean(double *a,double n) +{ + double sum=0; + for(int i=0;i + + + + Debug + Win32 + + + Release + Win32 + + + + {84D44900-27A3-45FC-B03B-FE2E51C2236C} + Win32Proj + P15 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P15/P15/P15.vcxproj.filters b/Code-C++/P15/P15/P15.vcxproj.filters new file mode 100644 index 0000000..fe3a91a --- /dev/null +++ b/Code-C++/P15/P15/P15.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P15/P15/ReadMe.txt b/Code-C++/P15/P15/ReadMe.txt new file mode 100644 index 0000000..2eb15d0 --- /dev/null +++ b/Code-C++/P15/P15/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:P15 项目概述 +======================================================================== + +应用程序向导已为您创建了此 P15 应用程序。 + +本文件概要介绍组成 P15 应用程序的每个文件的内容。 + + +P15.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +P15.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +P15.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 P15.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P15/P15/stdafx.cpp b/Code-C++/P15/P15/stdafx.cpp new file mode 100644 index 0000000..bf3bbf7 --- /dev/null +++ b/Code-C++/P15/P15/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// P15.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P15/P15/stdafx.h b/Code-C++/P15/P15/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P15/P15/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P15/P15/targetver.h b/Code-C++/P15/P15/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P15/P15/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P2/shun2.sdf b/Code-C++/P2/shun2.sdf new file mode 100644 index 0000000..9a3d88d Binary files /dev/null and b/Code-C++/P2/shun2.sdf differ diff --git a/Code-C++/P2/shun2.sln b/Code-C++/P2/shun2.sln new file mode 100644 index 0000000..1e50b1c --- /dev/null +++ b/Code-C++/P2/shun2.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shun2", "shun2\shun2.vcxproj", "{1078F70F-674D-449E-8038-7036EEAC0C4C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1078F70F-674D-449E-8038-7036EEAC0C4C}.Debug|Win32.ActiveCfg = Debug|Win32 + {1078F70F-674D-449E-8038-7036EEAC0C4C}.Debug|Win32.Build.0 = Debug|Win32 + {1078F70F-674D-449E-8038-7036EEAC0C4C}.Release|Win32.ActiveCfg = Release|Win32 + {1078F70F-674D-449E-8038-7036EEAC0C4C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P2/shun2.v11.suo b/Code-C++/P2/shun2.v11.suo new file mode 100644 index 0000000..368de24 Binary files /dev/null and b/Code-C++/P2/shun2.v11.suo differ diff --git a/Code-C++/P2/shun2/ReadMe.txt b/Code-C++/P2/shun2/ReadMe.txt new file mode 100644 index 0000000..618cbad --- /dev/null +++ b/Code-C++/P2/shun2/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:shun2 项目概述 +======================================================================== + +应用程序向导已为您创建了此 shun2 应用程序。 + +本文件概要介绍组成 shun2 应用程序的每个文件的内容。 + + +shun2.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +shun2.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +shun2.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 shun2.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P2/shun2/shun2.cpp b/Code-C++/P2/shun2/shun2.cpp new file mode 100644 index 0000000..ba1ff3d --- /dev/null +++ b/Code-C++/P2/shun2/shun2.cpp @@ -0,0 +1,31 @@ +// shun2.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include + #include +using namespace std; + +int main() +{ + double array[5]={/*green*/0.2,/*red*/0.2,/*red*/0.2,/*green*/0.2,/*green*/0.2}; + double pHit=0.6; + double pMiss=0.2; + string z; + cout<<"redgrreen "; + cin>>z; + if(z=="red") + { + double green=array[0]*pMiss/(array[0]*pMiss*3+array[1]*pHit*2); + double red=array[1]*pHit/(array[0]*pMiss*3+array[1]*pHit*2); + cout< + + + + Debug + Win32 + + + Release + Win32 + + + + {1078F70F-674D-449E-8038-7036EEAC0C4C} + Win32Proj + shun2 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P2/shun2/shun2.vcxproj.filters b/Code-C++/P2/shun2/shun2.vcxproj.filters new file mode 100644 index 0000000..5e52202 --- /dev/null +++ b/Code-C++/P2/shun2/shun2.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P2/shun2/stdafx.cpp b/Code-C++/P2/shun2/stdafx.cpp new file mode 100644 index 0000000..e250bdb --- /dev/null +++ b/Code-C++/P2/shun2/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// shun2.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P2/shun2/stdafx.h b/Code-C++/P2/shun2/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P2/shun2/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P2/shun2/targetver.h b/Code-C++/P2/shun2/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P2/shun2/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P3/shun3.sdf b/Code-C++/P3/shun3.sdf new file mode 100644 index 0000000..3de1a97 Binary files /dev/null and b/Code-C++/P3/shun3.sdf differ diff --git a/Code-C++/P3/shun3.sln b/Code-C++/P3/shun3.sln new file mode 100644 index 0000000..51c8640 --- /dev/null +++ b/Code-C++/P3/shun3.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shun3", "shun3\shun3.vcxproj", "{DBE017B8-A7C4-4CD7-A9DD-DE04895C0212}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DBE017B8-A7C4-4CD7-A9DD-DE04895C0212}.Debug|Win32.ActiveCfg = Debug|Win32 + {DBE017B8-A7C4-4CD7-A9DD-DE04895C0212}.Debug|Win32.Build.0 = Debug|Win32 + {DBE017B8-A7C4-4CD7-A9DD-DE04895C0212}.Release|Win32.ActiveCfg = Release|Win32 + {DBE017B8-A7C4-4CD7-A9DD-DE04895C0212}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P3/shun3.v11.suo b/Code-C++/P3/shun3.v11.suo new file mode 100644 index 0000000..451a1d8 Binary files /dev/null and b/Code-C++/P3/shun3.v11.suo differ diff --git a/Code-C++/P3/shun3/ReadMe.txt b/Code-C++/P3/shun3/ReadMe.txt new file mode 100644 index 0000000..0db706b --- /dev/null +++ b/Code-C++/P3/shun3/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:shun3 项目概述 +======================================================================== + +应用程序向导已为您创建了此 shun3 应用程序。 + +本文件概要介绍组成 shun3 应用程序的每个文件的内容。 + + +shun3.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +shun3.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +shun3.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 shun3.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P3/shun3/shun3.cpp b/Code-C++/P3/shun3/shun3.cpp new file mode 100644 index 0000000..41aee55 --- /dev/null +++ b/Code-C++/P3/shun3/shun3.cpp @@ -0,0 +1,34 @@ +// shun3.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include + #include +using namespace std; + +void function1() +{ + double pHit=0.6; + double pMiss=0.2; + double array[5]={/*green*/0.2,/*red*/0.2,/*red*/0.2,/*green*/0.2,/*green*/0.2}; + double temp0=array[0]; + double temp1=array[1]; + double temp00=temp0*pMiss/(temp0*pMiss*3+temp1*pHit*2); + double temp11=temp1*pHit/(temp0*pMiss*3+temp1*pHit*2); + array[0]=temp00*pHit/(temp00*pHit*3+temp11*pMiss*2); + array[1]=temp11*pMiss/(temp00*pHit*3+temp11*pMiss*2); + cout<>z; + if(z=="red,green") + { + function1(); + } + return 0; +} + diff --git a/Code-C++/P3/shun3/shun3.vcxproj b/Code-C++/P3/shun3/shun3.vcxproj new file mode 100644 index 0000000..2fec56c --- /dev/null +++ b/Code-C++/P3/shun3/shun3.vcxproj @@ -0,0 +1,95 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {DBE017B8-A7C4-4CD7-A9DD-DE04895C0212} + Win32Proj + shun3 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P3/shun3/shun3.vcxproj.filters b/Code-C++/P3/shun3/shun3.vcxproj.filters new file mode 100644 index 0000000..01ea61d --- /dev/null +++ b/Code-C++/P3/shun3/shun3.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P3/shun3/stdafx.cpp b/Code-C++/P3/shun3/stdafx.cpp new file mode 100644 index 0000000..ae61d1e --- /dev/null +++ b/Code-C++/P3/shun3/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// shun3.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P3/shun3/stdafx.h b/Code-C++/P3/shun3/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P3/shun3/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P3/shun3/targetver.h b/Code-C++/P3/shun3/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P3/shun3/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P4/shun4.sdf b/Code-C++/P4/shun4.sdf new file mode 100644 index 0000000..51720fb Binary files /dev/null and b/Code-C++/P4/shun4.sdf differ diff --git a/Code-C++/P4/shun4.sln b/Code-C++/P4/shun4.sln new file mode 100644 index 0000000..50900bc --- /dev/null +++ b/Code-C++/P4/shun4.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shun4", "shun4\shun4.vcxproj", "{E4FEAF23-6865-40D2-A264-B9139F9B63D7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E4FEAF23-6865-40D2-A264-B9139F9B63D7}.Debug|Win32.ActiveCfg = Debug|Win32 + {E4FEAF23-6865-40D2-A264-B9139F9B63D7}.Debug|Win32.Build.0 = Debug|Win32 + {E4FEAF23-6865-40D2-A264-B9139F9B63D7}.Release|Win32.ActiveCfg = Release|Win32 + {E4FEAF23-6865-40D2-A264-B9139F9B63D7}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P4/shun4.v11.suo b/Code-C++/P4/shun4.v11.suo new file mode 100644 index 0000000..691a845 Binary files /dev/null and b/Code-C++/P4/shun4.v11.suo differ diff --git a/Code-C++/P4/shun4/ReadMe.txt b/Code-C++/P4/shun4/ReadMe.txt new file mode 100644 index 0000000..075fce2 --- /dev/null +++ b/Code-C++/P4/shun4/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:shun4 项目概述 +======================================================================== + +应用程序向导已为您创建了此 shun4 应用程序。 + +本文件概要介绍组成 shun4 应用程序的每个文件的内容。 + + +shun4.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +shun4.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +shun4.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 shun4.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P4/shun4/shun4.cpp b/Code-C++/P4/shun4/shun4.cpp new file mode 100644 index 0000000..676c9dc --- /dev/null +++ b/Code-C++/P4/shun4/shun4.cpp @@ -0,0 +1,38 @@ +// shun4.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +#include +#include +using namespace std; + + +int main() +{ + int N, x; + cout<<"鳤ƴ"; + cin>>N>>x; + vector a(N); + cout<<"Ԫ"; + for (int i=0;i>a[i]; + int n= x%N; + if (n==0); + else { + while (n--) { + int temp = a[N-1]; + for (int i=N-1;i>0;i--) + { + a[i]= a[i-1]; + } + a[0] = temp; + } + } + for (int i=0;i + + + + Debug + Win32 + + + Release + Win32 + + + + {E4FEAF23-6865-40D2-A264-B9139F9B63D7} + Win32Proj + shun4 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P4/shun4/shun4.vcxproj.filters b/Code-C++/P4/shun4/shun4.vcxproj.filters new file mode 100644 index 0000000..7318fdf --- /dev/null +++ b/Code-C++/P4/shun4/shun4.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P4/shun4/stdafx.cpp b/Code-C++/P4/shun4/stdafx.cpp new file mode 100644 index 0000000..9724144 --- /dev/null +++ b/Code-C++/P4/shun4/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// shun4.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P4/shun4/stdafx.h b/Code-C++/P4/shun4/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P4/shun4/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P4/shun4/targetver.h b/Code-C++/P4/shun4/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P4/shun4/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include diff --git a/Code-C++/P65/shun 6.sdf b/Code-C++/P65/shun 6.sdf new file mode 100644 index 0000000..0dc0b81 Binary files /dev/null and b/Code-C++/P65/shun 6.sdf differ diff --git a/Code-C++/P65/shun 6.sln b/Code-C++/P65/shun 6.sln new file mode 100644 index 0000000..597fa76 --- /dev/null +++ b/Code-C++/P65/shun 6.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shun 6", "shun 6\shun 6.vcxproj", "{D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC}.Debug|Win32.Build.0 = Debug|Win32 + {D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC}.Release|Win32.ActiveCfg = Release|Win32 + {D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Code-C++/P65/shun 6.v11.suo b/Code-C++/P65/shun 6.v11.suo new file mode 100644 index 0000000..2eda7c0 Binary files /dev/null and b/Code-C++/P65/shun 6.v11.suo differ diff --git a/Code-C++/P65/shun 6/ReadMe.txt b/Code-C++/P65/shun 6/ReadMe.txt new file mode 100644 index 0000000..b962178 --- /dev/null +++ b/Code-C++/P65/shun 6/ReadMe.txt @@ -0,0 +1,30 @@ +======================================================================== + 控制台应用程序:shun 6 项目概述 +======================================================================== + +应用程序向导已为您创建了此 shun 6 应用程序。 + +本文件概要介绍组成 shun 6 应用程序的每个文件的内容。 + + +shun 6.vcxproj + 这是使用应用程序向导生成的 VC++ 项目的主项目文件,其中包含生成该文件的 Visual C++ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。 + +shun 6.vcxproj.filters + 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。它包含有关项目文件与筛选器之间的关联信息。在 IDE 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。例如,“.cpp”文件与“源文件”筛选器关联。 + +shun 6.cpp + 这是主应用程序源文件。 + +///////////////////////////////////////////////////////////////////////////// +其他标准文件: + +StdAfx.h, StdAfx.cpp + 这些文件用于生成名为 shun 6.pch 的预编译头 (PCH) 文件和名为 StdAfx.obj 的预编译类型文件。 + +///////////////////////////////////////////////////////////////////////////// +其他注释: + +应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。 + +///////////////////////////////////////////////////////////////////////////// diff --git a/Code-C++/P65/shun 6/shun 6.cpp b/Code-C++/P65/shun 6/shun 6.cpp new file mode 100644 index 0000000..c5a5da0 --- /dev/null +++ b/Code-C++/P65/shun 6/shun 6.cpp @@ -0,0 +1,40 @@ +// shun 6.cpp : ̨Ӧóڵ㡣 +// + +#include "stdafx.h" +#include +#include + #include +using namespace std; +#define u 20 +int i,n; +float H_X,Px[u]; +float log2(float x) +{ + float z; + z=(float)(log(x)/log(2)); + return z; +} +float entropy(float *x,int n) +{ + float z=0; + for(i=1;i<=n;i++) + { + z+=(*(x+i))*log2(1/(*(x+i))); + } + return z; +} +int main() +{ + cout<<" "; + cin>>n; + cout<<" "; + for(i=1;i<=n;i++) + { + cin>>Px[i]; + } + H_X=entropy(Px,n); + cout< + + + + Debug + Win32 + + + Release + Win32 + + + + {D1601B6D-7FC9-45CE-B32E-BB3E99EB92BC} + Win32Proj + shun6 + + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Code-C++/P65/shun 6/shun 6.vcxproj.filters b/Code-C++/P65/shun 6/shun 6.vcxproj.filters new file mode 100644 index 0000000..5e8df06 --- /dev/null +++ b/Code-C++/P65/shun 6/shun 6.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + \ No newline at end of file diff --git a/Code-C++/P65/shun 6/stdafx.cpp b/Code-C++/P65/shun 6/stdafx.cpp new file mode 100644 index 0000000..fea4f1d --- /dev/null +++ b/Code-C++/P65/shun 6/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : ֻ׼ļԴļ +// shun 6.pch ΪԤͷ +// stdafx.obj ԤϢ + +#include "stdafx.h" + +// TODO: STDAFX.H +// κĸͷļڴļ diff --git a/Code-C++/P65/shun 6/stdafx.h b/Code-C++/P65/shun 6/stdafx.h new file mode 100644 index 0000000..9d41f0f --- /dev/null +++ b/Code-C++/P65/shun 6/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : ׼ϵͳļİļ +// Ǿʹõĵ +// ضĿİļ +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: ڴ˴óҪͷļ diff --git a/Code-C++/P65/shun 6/targetver.h b/Code-C++/P65/shun 6/targetver.h new file mode 100644 index 0000000..7a7d2c8 --- /dev/null +++ b/Code-C++/P65/shun 6/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// SDKDDKVer.h õ߰汾 Windows ƽ̨ + +// ҪΪǰ Windows ƽ̨Ӧó WinSDKVer.h +// WIN32_WINNT ΪҪֵ֧ƽ̨Ȼٰ SDKDDKVer.h + +#include