From 682fac9b6ebc5c020f69cf7772e7d69733051226 Mon Sep 17 00:00:00 2001 From: Samecoins Date: Tue, 19 Nov 2024 10:24:34 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- лаб 2/лаб 2.sln | 31 +++++ лаб 2/лаб 2/FileName.cpp | 119 ++++++++++++++++++ лаб 2/лаб 2/лаб 2.vcxproj | 135 +++++++++++++++++++++ лаб 2/лаб 2/лаб 2.vcxproj.filters | 22 ++++ 4 files changed, 307 insertions(+) create mode 100644 лаб 2/лаб 2.sln create mode 100644 лаб 2/лаб 2/FileName.cpp create mode 100644 лаб 2/лаб 2/лаб 2.vcxproj create mode 100644 лаб 2/лаб 2/лаб 2.vcxproj.filters diff --git a/лаб 2/лаб 2.sln b/лаб 2/лаб 2.sln new file mode 100644 index 0000000..fda1bdd --- /dev/null +++ b/лаб 2/лаб 2.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "лаб 2", "лаб 2\лаб 2.vcxproj", "{C9813538-4654-497E-80E2-34F5D7B435B7}" +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 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Debug|x64.ActiveCfg = Debug|x64 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Debug|x64.Build.0 = Debug|x64 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Debug|x86.ActiveCfg = Debug|Win32 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Debug|x86.Build.0 = Debug|Win32 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Release|x64.ActiveCfg = Release|x64 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Release|x64.Build.0 = Release|x64 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Release|x86.ActiveCfg = Release|Win32 + {C9813538-4654-497E-80E2-34F5D7B435B7}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {890F3F50-833D-424A-BA7F-B4A50D6B4163} + EndGlobalSection +EndGlobal diff --git a/лаб 2/лаб 2/FileName.cpp b/лаб 2/лаб 2/FileName.cpp new file mode 100644 index 0000000..27af8fa --- /dev/null +++ b/лаб 2/лаб 2/FileName.cpp @@ -0,0 +1,119 @@ +#include +#include +#include + +void odin() +{ + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + float h = 12.0; + float g = 9.8; + float t = sqrt(2 * h / g); + printf(" %f \n", h); + printf(" %f \n", t); + +} +void dva() +{ + + float hh; + printf(" ="); + scanf_s("%f", &hh); + float gg = 9.8; + float tt = sqrt(2 * hh / gg); + printf(" %f \n", hh); + printf(" %f \n", tt); +} +void tri() +{ + float mm; + int rub_mm; + printf(" m*n="); + scanf_s("%f", &mm); + + printf(" 1 RUB="); + scanf_s("%d",&rub_mm); + + float price = mm * rub_mm; + + printf(" %f m*n %d RUB/(m*n) <%10.1f> RUB\n", mm, rub_mm, price); +} +void chetiri() +{ + + float m; + float rub_m; + int zar; + printf(" m*n="); + scanf_s("%f", &m); + + printf(" 1 RUB="); + scanf_s("%f", &rub_m); + + printf(" RUB="); + scanf_s("%d", &zar); + + float price = m * rub_m; + float creditus = price / (zar / 2); + printf(" %f m*n %f RUB/(m*n) <%10.1f> RUB\n", m, rub_m, price); + printf(" %d RUB %f \n",zar,creditus); +} +void pyat() +{ + + + float a; + float h; + printf(" ="); + scanf_s("%f", &a); + + printf(" ="); + scanf_s("%f", &h); + + float s = a * (h / 2); + + printf(" %f", s); +} +void six() +{ + + float mmm; + float ggg; + printf(" m="); + scanf_s("%f", &mmm); + + printf(" g="); + scanf_s("%f", &ggg); + + float F = mmm * ggg; + printf(" %f H \n", F); + +} +void main() +{ + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + printf(" 1\n"); + odin(); + printf(" 2\n"); + dva(); + printf(" 3\n"); + tri(); + printf(" 4\n"); + chetiri(); + printf(" 5\n"); + pyat(); + printf("\n"); + printf(" 6\n"); + six(); + printf(" 7\n"); + float credit; + float returnn; + printf(" :"); + scanf_s("%f", &credit); + printf(" :"); + scanf_s("%f", &returnn); + float time = credit / returnn; + printf(" %f ",time); +} + diff --git a/лаб 2/лаб 2/лаб 2.vcxproj b/лаб 2/лаб 2/лаб 2.vcxproj new file mode 100644 index 0000000..be67615 --- /dev/null +++ b/лаб 2/лаб 2/лаб 2.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {c9813538-4654-497e-80e2-34f5d7b435b7} + лаб2 + 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/лаб 2/лаб 2/лаб 2.vcxproj.filters b/лаб 2/лаб 2/лаб 2.vcxproj.filters new file mode 100644 index 0000000..3f0db78 --- /dev/null +++ b/лаб 2/лаб 2/лаб 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