From d97bc3677faf17705093808ab68cae69eddbcb42 Mon Sep 17 00:00:00 2001 From: arturpiska Date: Tue, 19 Nov 2024 15:15:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- лаб 10/лаб 10/Source.cpp | 99 +++++++++++++ лаб 10/лаб 10/лаб 10.vcxproj | 135 ++++++++++++++++++ лаб 10/лаб 10/лаб 10.vcxproj.filters | 22 +++ 3 files changed, 256 insertions(+) create mode 100644 лаб 10/лаб 10/Source.cpp create mode 100644 лаб 10/лаб 10/лаб 10.vcxproj create mode 100644 лаб 10/лаб 10/лаб 10.vcxproj.filters diff --git a/лаб 10/лаб 10/Source.cpp b/лаб 10/лаб 10/Source.cpp new file mode 100644 index 0000000..d22c59d --- /dev/null +++ b/лаб 10/лаб 10/Source.cpp @@ -0,0 +1,99 @@ +#include +#include + +void Ex1() { + int i, j; + + i = 1; + do { + j = 1; + do { + printf("%d ", j); + j++; + } while (j <= 4); + + printf("\n"); + i++; + } while (i <= 3); +} + +void Ex2() { + int h = 0; + do { + int m = 0; + do { + printf("%02d:%02d ", h, m); + m += 10; + } while (m < 60); + + printf("\n"); + h++; + } while (h < 24); +} + +void w1() { + int n; + int m; + + printf(" n = "); + scanf_s("%d", &n); + + printf(" m = "); + scanf_s("%d", &m); + int d2 = 1; + do { + int d1 = 1; + do { + printf("%d%d ", d2, d1); + d1++; + } while (d1 <= n); + + printf("\n"); + d2++; + } while (d2 <= m); + +} + +void w2() { + int i = 1; + int j; + int n; + printf(" n = "); + scanf_s("%d", &n); + int m; + printf(" m = "); + scanf_s("%d", &m); + do { + j = 1; + do { + printf("%4d", i * j); + j++; + } while (j <= n); + + printf("\n"); + i++; + } while (i <= m); +} + +void main() { + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + int n; + do { + printf("\n"); + printf("1: 1\n"); + printf("2: 2\n"); + printf("\n"); + printf("0: \n"); + scanf_s("%d", &n); + switch (n) { + case 1: + w1(); + break; + case 2: + w2(); + break; + } + + } while (n != 0); +} \ No newline at end of file diff --git a/лаб 10/лаб 10/лаб 10.vcxproj b/лаб 10/лаб 10/лаб 10.vcxproj new file mode 100644 index 0000000..43eb97f --- /dev/null +++ b/лаб 10/лаб 10/лаб 10.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {d4715e26-411e-455c-b6dc-252cd0456651} + лаб10 + 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/лаб 10/лаб 10/лаб 10.vcxproj.filters b/лаб 10/лаб 10/лаб 10.vcxproj.filters new file mode 100644 index 0000000..ef66db6 --- /dev/null +++ b/лаб 10/лаб 10/лаб 10.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