From 4b6865201df267033bd2f6092970734057358a5a Mon Sep 17 00:00:00 2001 From: Launchcore Date: Thu, 26 Oct 2023 10:05:19 +0800 Subject: [PATCH] 2023-10-26 --- Classwork3/Classwork3.sln | 30 ++++++ Classwork3/S3_3/S3_3.cpp | 19 ++++ Classwork3/S3_3/S3_3.vcxproj | 135 ++++++++++++++++++++++++++ Classwork3/S3_3/S3_3.vcxproj.filters | 22 +++++ Classwork3/S3_4/S3_4.cpp | 19 ++++ Classwork3/S3_4/S3_4.vcxproj | 135 ++++++++++++++++++++++++++ Classwork3/S3_4/S3_4.vcxproj.filters | 22 +++++ Classwork3/S3_5/S3_5.cpp | 17 ++++ Classwork3/S3_5/S3_5.vcxproj | 135 ++++++++++++++++++++++++++ Classwork3/S3_5/S3_5.vcxproj.filters | 22 +++++ Classwork4/Classwork4.sln | 71 ++++++++++++++ Classwork4/S4_1/S4_1.cpp | 25 +++++ Classwork4/S4_1/S4_1.vcxproj | 135 ++++++++++++++++++++++++++ Classwork4/S4_1/S4_1.vcxproj.filters | 22 +++++ Classwork4/S4_2/S4_2.cpp | 16 +++ Classwork4/S4_2/S4_2.vcxproj | 135 ++++++++++++++++++++++++++ Classwork4/S4_2/S4_2.vcxproj.filters | 22 +++++ Classwork4/S4_3/S4_3.cpp | 19 ++++ Classwork4/S4_3/S4_3.vcxproj | 140 +++++++++++++++++++++++++++ Classwork4/S4_3/S4_3.vcxproj.filters | 25 +++++ Classwork4/S4_3/S4_3_mod.cpp | 17 ++++ Classwork4/S4_4/S4_4.cpp | 18 ++++ Classwork4/S4_4/S4_4.vcxproj | 135 ++++++++++++++++++++++++++ Classwork4/S4_4/S4_4.vcxproj.filters | 22 +++++ Classwork4/S4_5/S4_5.cpp | 20 ++++ Classwork4/S4_5/S4_5.vcxproj | 135 ++++++++++++++++++++++++++ Classwork4/S4_5/S4_5.vcxproj.filters | 22 +++++ 27 files changed, 1535 insertions(+) create mode 100644 Classwork3/S3_3/S3_3.cpp create mode 100644 Classwork3/S3_3/S3_3.vcxproj create mode 100644 Classwork3/S3_3/S3_3.vcxproj.filters create mode 100644 Classwork3/S3_4/S3_4.cpp create mode 100644 Classwork3/S3_4/S3_4.vcxproj create mode 100644 Classwork3/S3_4/S3_4.vcxproj.filters create mode 100644 Classwork3/S3_5/S3_5.cpp create mode 100644 Classwork3/S3_5/S3_5.vcxproj create mode 100644 Classwork3/S3_5/S3_5.vcxproj.filters create mode 100644 Classwork4/Classwork4.sln create mode 100644 Classwork4/S4_1/S4_1.cpp create mode 100644 Classwork4/S4_1/S4_1.vcxproj create mode 100644 Classwork4/S4_1/S4_1.vcxproj.filters create mode 100644 Classwork4/S4_2/S4_2.cpp create mode 100644 Classwork4/S4_2/S4_2.vcxproj create mode 100644 Classwork4/S4_2/S4_2.vcxproj.filters create mode 100644 Classwork4/S4_3/S4_3.cpp create mode 100644 Classwork4/S4_3/S4_3.vcxproj create mode 100644 Classwork4/S4_3/S4_3.vcxproj.filters create mode 100644 Classwork4/S4_3/S4_3_mod.cpp create mode 100644 Classwork4/S4_4/S4_4.cpp create mode 100644 Classwork4/S4_4/S4_4.vcxproj create mode 100644 Classwork4/S4_4/S4_4.vcxproj.filters create mode 100644 Classwork4/S4_5/S4_5.cpp create mode 100644 Classwork4/S4_5/S4_5.vcxproj create mode 100644 Classwork4/S4_5/S4_5.vcxproj.filters diff --git a/Classwork3/Classwork3.sln b/Classwork3/Classwork3.sln index ff9c8b0..8436fd5 100644 --- a/Classwork3/Classwork3.sln +++ b/Classwork3/Classwork3.sln @@ -7,6 +7,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S3_1", "S3_1\S3_1.vcxproj", EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S3_2", "S3_2\S3_2.vcxproj", "{30F15281-7360-4D9E-871A-941DC6981A9E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S3_3", "S3_3\S3_3.vcxproj", "{93F442B3-4971-4E44-A136-4944E22F1DB1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S3_4", "S3_4\S3_4.vcxproj", "{CA51C490-4154-4BCB-B966-3BBA88AE048E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S3_5", "S3_5\S3_5.vcxproj", "{73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -31,6 +37,30 @@ Global {30F15281-7360-4D9E-871A-941DC6981A9E}.Release|x64.Build.0 = Release|x64 {30F15281-7360-4D9E-871A-941DC6981A9E}.Release|x86.ActiveCfg = Release|Win32 {30F15281-7360-4D9E-871A-941DC6981A9E}.Release|x86.Build.0 = Release|Win32 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Debug|x64.ActiveCfg = Debug|x64 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Debug|x64.Build.0 = Debug|x64 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Debug|x86.ActiveCfg = Debug|Win32 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Debug|x86.Build.0 = Debug|Win32 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Release|x64.ActiveCfg = Release|x64 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Release|x64.Build.0 = Release|x64 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Release|x86.ActiveCfg = Release|Win32 + {93F442B3-4971-4E44-A136-4944E22F1DB1}.Release|x86.Build.0 = Release|Win32 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Debug|x64.ActiveCfg = Debug|x64 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Debug|x64.Build.0 = Debug|x64 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Debug|x86.ActiveCfg = Debug|Win32 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Debug|x86.Build.0 = Debug|Win32 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Release|x64.ActiveCfg = Release|x64 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Release|x64.Build.0 = Release|x64 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Release|x86.ActiveCfg = Release|Win32 + {CA51C490-4154-4BCB-B966-3BBA88AE048E}.Release|x86.Build.0 = Release|Win32 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Debug|x64.ActiveCfg = Debug|x64 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Debug|x64.Build.0 = Debug|x64 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Debug|x86.ActiveCfg = Debug|Win32 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Debug|x86.Build.0 = Debug|Win32 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Release|x64.ActiveCfg = Release|x64 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Release|x64.Build.0 = Release|x64 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Release|x86.ActiveCfg = Release|Win32 + {73EE6A90-C2B3-45B3-8F34-A2CCA5CED6BB}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Classwork3/S3_3/S3_3.cpp b/Classwork3/S3_3/S3_3.cpp new file mode 100644 index 0000000..23d33c9 --- /dev/null +++ b/Classwork3/S3_3/S3_3.cpp @@ -0,0 +1,19 @@ +#include +using namespace std; +int main() +{ + int a0, a1, a2; + int b; + for (b=100; b<=999; b++) + { + a2 = b / 100; + a1 = (b % 100) / 10; + a0 = b % 10; + if (b == (a0 * a0 * a0 + a1 * a1 * a1 + a2 * a2 * a2)) + cout << b << '\t'; + } + cout << endl; + return 0; +} + +// 153 370 371 407 \ No newline at end of file diff --git a/Classwork3/S3_3/S3_3.vcxproj b/Classwork3/S3_3/S3_3.vcxproj new file mode 100644 index 0000000..d585668 --- /dev/null +++ b/Classwork3/S3_3/S3_3.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {93f442b3-4971-4e44-a136-4944e22f1db1} + S33 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork3/S3_3/S3_3.vcxproj.filters b/Classwork3/S3_3/S3_3.vcxproj.filters new file mode 100644 index 0000000..75c8937 --- /dev/null +++ b/Classwork3/S3_3/S3_3.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork3/S3_4/S3_4.cpp b/Classwork3/S3_4/S3_4.cpp new file mode 100644 index 0000000..93fd65d --- /dev/null +++ b/Classwork3/S3_4/S3_4.cpp @@ -0,0 +1,19 @@ +#include +using namespace std; +int main() +{ + int a0, a1, a2; + int b; + for (b = 1; b <= 599; b++) + { + a2 = b / 100; + a1 = (b % 100) / 10; + a0 = b % 10; + if ((b % 3 == 0) && (a0 == 5 || a1 == 5 || a2 == 5)) + cout << b << '\t'; + } + cout << endl; + return 0; +} + +// 15 45 51 54 57 75 105 135 150 153 156 159 165 195 225 252 255 258 285 315 345 351 354 357 375 405 435 450 453 456 459 465 495 501 504 507 510 513 516 519 522 525 528 531 534 537 540 543 546 549 552 555 558 561 564 567 570 573 576 579 582 585 588 591 594 597 \ No newline at end of file diff --git a/Classwork3/S3_4/S3_4.vcxproj b/Classwork3/S3_4/S3_4.vcxproj new file mode 100644 index 0000000..9377169 --- /dev/null +++ b/Classwork3/S3_4/S3_4.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {ca51c490-4154-4bcb-b966-3bba88ae048e} + S34 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork3/S3_4/S3_4.vcxproj.filters b/Classwork3/S3_4/S3_4.vcxproj.filters new file mode 100644 index 0000000..6082e4e --- /dev/null +++ b/Classwork3/S3_4/S3_4.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork3/S3_5/S3_5.cpp b/Classwork3/S3_5/S3_5.cpp new file mode 100644 index 0000000..23aa5ac --- /dev/null +++ b/Classwork3/S3_5/S3_5.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; +int main() +{ + int a, b, c = 0; + cin >> a; + while(true) + { + b = a % 10; + c += b; + a = a / 10; + if (a == 0) + break; + } + cout << c << endl; + return 0; +} \ No newline at end of file diff --git a/Classwork3/S3_5/S3_5.vcxproj b/Classwork3/S3_5/S3_5.vcxproj new file mode 100644 index 0000000..08dfbaf --- /dev/null +++ b/Classwork3/S3_5/S3_5.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {73ee6a90-c2b3-45b3-8f34-a2cca5ced6bb} + S35 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork3/S3_5/S3_5.vcxproj.filters b/Classwork3/S3_5/S3_5.vcxproj.filters new file mode 100644 index 0000000..a24982f --- /dev/null +++ b/Classwork3/S3_5/S3_5.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork4/Classwork4.sln b/Classwork4/Classwork4.sln new file mode 100644 index 0000000..5b2dba6 --- /dev/null +++ b/Classwork4/Classwork4.sln @@ -0,0 +1,71 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34202.233 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S4_1", "S4_1\S4_1.vcxproj", "{34641743-B085-4BBD-A96B-BA885A343661}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S4_2", "S4_2\S4_2.vcxproj", "{2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S4_3", "S4_3\S4_3.vcxproj", "{31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S4_4", "S4_4\S4_4.vcxproj", "{BABA3E35-351E-417C-A23E-0DFD37513353}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "S4_5", "S4_5\S4_5.vcxproj", "{E6A52C0F-25B7-4E70-B6B1-C9120193608B}" +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 + {34641743-B085-4BBD-A96B-BA885A343661}.Debug|x64.ActiveCfg = Debug|x64 + {34641743-B085-4BBD-A96B-BA885A343661}.Debug|x64.Build.0 = Debug|x64 + {34641743-B085-4BBD-A96B-BA885A343661}.Debug|x86.ActiveCfg = Debug|Win32 + {34641743-B085-4BBD-A96B-BA885A343661}.Debug|x86.Build.0 = Debug|Win32 + {34641743-B085-4BBD-A96B-BA885A343661}.Release|x64.ActiveCfg = Release|x64 + {34641743-B085-4BBD-A96B-BA885A343661}.Release|x64.Build.0 = Release|x64 + {34641743-B085-4BBD-A96B-BA885A343661}.Release|x86.ActiveCfg = Release|Win32 + {34641743-B085-4BBD-A96B-BA885A343661}.Release|x86.Build.0 = Release|Win32 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Debug|x64.ActiveCfg = Debug|x64 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Debug|x64.Build.0 = Debug|x64 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Debug|x86.ActiveCfg = Debug|Win32 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Debug|x86.Build.0 = Debug|Win32 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Release|x64.ActiveCfg = Release|x64 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Release|x64.Build.0 = Release|x64 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Release|x86.ActiveCfg = Release|Win32 + {2708C15E-AA70-4CFF-99E0-F77EF0FEE39B}.Release|x86.Build.0 = Release|Win32 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Debug|x64.ActiveCfg = Debug|x64 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Debug|x64.Build.0 = Debug|x64 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Debug|x86.ActiveCfg = Debug|Win32 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Debug|x86.Build.0 = Debug|Win32 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Release|x64.ActiveCfg = Release|x64 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Release|x64.Build.0 = Release|x64 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Release|x86.ActiveCfg = Release|Win32 + {31154D07-1A78-4ACE-9E2C-7F3F2739AC9D}.Release|x86.Build.0 = Release|Win32 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Debug|x64.ActiveCfg = Debug|x64 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Debug|x64.Build.0 = Debug|x64 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Debug|x86.ActiveCfg = Debug|Win32 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Debug|x86.Build.0 = Debug|Win32 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Release|x64.ActiveCfg = Release|x64 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Release|x64.Build.0 = Release|x64 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Release|x86.ActiveCfg = Release|Win32 + {BABA3E35-351E-417C-A23E-0DFD37513353}.Release|x86.Build.0 = Release|Win32 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Debug|x64.ActiveCfg = Debug|x64 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Debug|x64.Build.0 = Debug|x64 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Debug|x86.ActiveCfg = Debug|Win32 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Debug|x86.Build.0 = Debug|Win32 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Release|x64.ActiveCfg = Release|x64 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Release|x64.Build.0 = Release|x64 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Release|x86.ActiveCfg = Release|Win32 + {E6A52C0F-25B7-4E70-B6B1-C9120193608B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0984FEAB-BD55-4AC6-81B0-6723511C518D} + EndGlobalSection +EndGlobal diff --git a/Classwork4/S4_1/S4_1.cpp b/Classwork4/S4_1/S4_1.cpp new file mode 100644 index 0000000..993746a --- /dev/null +++ b/Classwork4/S4_1/S4_1.cpp @@ -0,0 +1,25 @@ +#include +using namespace std; +int main() +{ + int a, b; + int t, x; + cout << ""; + cin >> a >> b; + x = a * b; + if (a 8,96 +// 35,21 -> 7,105 \ No newline at end of file diff --git a/Classwork4/S4_1/S4_1.vcxproj b/Classwork4/S4_1/S4_1.vcxproj new file mode 100644 index 0000000..1f94f00 --- /dev/null +++ b/Classwork4/S4_1/S4_1.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {34641743-b085-4bbd-a96b-ba885a343661} + S41 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork4/S4_1/S4_1.vcxproj.filters b/Classwork4/S4_1/S4_1.vcxproj.filters new file mode 100644 index 0000000..9781fc6 --- /dev/null +++ b/Classwork4/S4_1/S4_1.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork4/S4_2/S4_2.cpp b/Classwork4/S4_2/S4_2.cpp new file mode 100644 index 0000000..8ff610f --- /dev/null +++ b/Classwork4/S4_2/S4_2.cpp @@ -0,0 +1,16 @@ +#include +using namespace std; +int main() +{ + int a, b, c, i; + cout << "Input three number:"; + cin >> a >> b >> c; + for (i = a; i >= 1; i--) + if (a % i == 0 && b % i == 0 && c % i == 0) + break; + cout << i << endl; + return 0; +} + +// 24 48 64 -> 8 +// 25 24 23 -> 1 \ No newline at end of file diff --git a/Classwork4/S4_2/S4_2.vcxproj b/Classwork4/S4_2/S4_2.vcxproj new file mode 100644 index 0000000..e773340 --- /dev/null +++ b/Classwork4/S4_2/S4_2.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {2708c15e-aa70-4cff-99e0-f77ef0fee39b} + S42 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork4/S4_2/S4_2.vcxproj.filters b/Classwork4/S4_2/S4_2.vcxproj.filters new file mode 100644 index 0000000..f973aeb --- /dev/null +++ b/Classwork4/S4_2/S4_2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork4/S4_3/S4_3.cpp b/Classwork4/S4_3/S4_3.cpp new file mode 100644 index 0000000..ed33654 --- /dev/null +++ b/Classwork4/S4_3/S4_3.cpp @@ -0,0 +1,19 @@ +#include +using namespace std; +int main() +{ + int a, i; + cout << "һ"; + cin >> a; + for (i = 2; i < a; i++) + if (a % i == 0) + break; + if (i == a) + cout << a << "\n"; + else + cout << a << "\n"; + return 0; +} + +// 25 -> 25 +// 23 -> 23 \ No newline at end of file diff --git a/Classwork4/S4_3/S4_3.vcxproj b/Classwork4/S4_3/S4_3.vcxproj new file mode 100644 index 0000000..b4aca27 --- /dev/null +++ b/Classwork4/S4_3/S4_3.vcxproj @@ -0,0 +1,140 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {31154d07-1a78-4ace-9e2c-7f3f2739ac9d} + S43 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + true + + + false + + + + + + \ No newline at end of file diff --git a/Classwork4/S4_3/S4_3.vcxproj.filters b/Classwork4/S4_3/S4_3.vcxproj.filters new file mode 100644 index 0000000..4994476 --- /dev/null +++ b/Classwork4/S4_3/S4_3.vcxproj.filters @@ -0,0 +1,25 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork4/S4_3/S4_3_mod.cpp b/Classwork4/S4_3/S4_3_mod.cpp new file mode 100644 index 0000000..fb243c2 --- /dev/null +++ b/Classwork4/S4_3/S4_3_mod.cpp @@ -0,0 +1,17 @@ +#include +#include +using namespace std; +int main() +{ + int a, i; + cout << "һ"; + cin >> a; + for (i = 2; i < int(sqrt(a))+1; i++) + if (a % i == 0) + break; + if (i == int(sqrt(a)) + 1) + cout << a << "\n"; + else + cout << a << "\n"; + return 0; +} \ No newline at end of file diff --git a/Classwork4/S4_4/S4_4.cpp b/Classwork4/S4_4/S4_4.cpp new file mode 100644 index 0000000..a9ca9b1 --- /dev/null +++ b/Classwork4/S4_4/S4_4.cpp @@ -0,0 +1,18 @@ +#include +#include +using namespace std; +int main() +{ + int a, i; + for (a = 100; a<=200; a++) + { + for (i = 2; i < int(sqrt(a)) + 1; i++) + if (a % i == 0) + break; + if (i == int(sqrt(a)) + 1) + cout << a << '\t'; + } + return 0; +} + +// 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 \ No newline at end of file diff --git a/Classwork4/S4_4/S4_4.vcxproj b/Classwork4/S4_4/S4_4.vcxproj new file mode 100644 index 0000000..970ecd6 --- /dev/null +++ b/Classwork4/S4_4/S4_4.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {baba3e35-351e-417c-a23e-0dfd37513353} + S44 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork4/S4_4/S4_4.vcxproj.filters b/Classwork4/S4_4/S4_4.vcxproj.filters new file mode 100644 index 0000000..22fb8ee --- /dev/null +++ b/Classwork4/S4_4/S4_4.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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/Classwork4/S4_5/S4_5.cpp b/Classwork4/S4_5/S4_5.cpp new file mode 100644 index 0000000..78317ec --- /dev/null +++ b/Classwork4/S4_5/S4_5.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main() +{ + int a, b, c; + for (a = 1; a < 1000; a++) + { + c = 0; + for (b = 1; b < a; b++) + { + if (a % b == 0) + c += b; + } + if (a == c) + cout << a << '\t'; + } + return 0; +} + +// 6 28 496 \ No newline at end of file diff --git a/Classwork4/S4_5/S4_5.vcxproj b/Classwork4/S4_5/S4_5.vcxproj new file mode 100644 index 0000000..07d8292 --- /dev/null +++ b/Classwork4/S4_5/S4_5.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {e6a52c0f-25b7-4e70-b6b1-c9120193608b} + S45 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/Classwork4/S4_5/S4_5.vcxproj.filters b/Classwork4/S4_5/S4_5.vcxproj.filters new file mode 100644 index 0000000..8b5cc52 --- /dev/null +++ b/Classwork4/S4_5/S4_5.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;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