diff --git a/lab 4/lab 4.sln b/lab 4/lab 4.sln new file mode 100644 index 0000000..6f4f5aa --- /dev/null +++ b/lab 4/lab 4.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lab 4", "lab 4\lab 4.vcxproj", "{D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}" +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 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Debug|x64.ActiveCfg = Debug|x64 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Debug|x64.Build.0 = Debug|x64 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Debug|x86.ActiveCfg = Debug|Win32 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Debug|x86.Build.0 = Debug|Win32 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Release|x64.ActiveCfg = Release|x64 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Release|x64.Build.0 = Release|x64 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Release|x86.ActiveCfg = Release|Win32 + {D74FEE26-DF5C-43B3-8DCD-43DFEE8C005B}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4076F7A6-5447-4DC3-AD1D-11B0FAF4A187} + EndGlobalSection +EndGlobal diff --git a/lab 4/lab 4/lab 4.c b/lab 4/lab 4/lab 4.c new file mode 100644 index 0000000..bf886fd --- /dev/null +++ b/lab 4/lab 4/lab 4.c @@ -0,0 +1,23 @@ +//#include +//#include +// +//void main() { +// SetConsoleCP(1251); +// SetConsoleOutputCP(1251); +// int n; +// int i; +// int s; +// +// +// printf(" n = "); +// scanf_s("%d", &n); +// +// i = 2; +// s = 0; +// do { +// printf("%d ", i); +// i = i + 2; +// s++; +// } while (s < n); +// +//} \ No newline at end of file diff --git a/lab 4/lab 4/lab 4.vcxproj b/lab 4/lab 4/lab 4.vcxproj new file mode 100644 index 0000000..1e60620 --- /dev/null +++ b/lab 4/lab 4/lab 4.vcxproj @@ -0,0 +1,140 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {d74fee26-df5c-43b3-8dcd-43dfee8c005b} + lab4 + 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/lab 4/lab 4/lab 4.vcxproj.filters b/lab 4/lab 4/lab 4.vcxproj.filters new file mode 100644 index 0000000..986c617 --- /dev/null +++ b/lab 4/lab 4/lab 4.vcxproj.filters @@ -0,0 +1,37 @@ + + + + + {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/lab 4/lab 4/n четные.c b/lab 4/lab 4/n четные.c new file mode 100644 index 0000000..6a58246 --- /dev/null +++ b/lab 4/lab 4/n четные.c @@ -0,0 +1,26 @@ +//#include +//#include +// +//void main() { +// SetConsoleCP(1251); +// SetConsoleOutputCP(1251); +// int n; +// int i; +// int s; +// int a; +// +// +// printf(" n = "); +// scanf_s("%d", &n); +// printf(" a = "); +// scanf_s("%d", &a); +// +// i = a; +// s = 0; +// do { +// printf("%d ", a); +// a = a + i; +// s++; +// } while (s < n); +// +//} \ No newline at end of file diff --git a/lab 4/lab 4/деньги.c b/lab 4/lab 4/деньги.c new file mode 100644 index 0000000..35c35da --- /dev/null +++ b/lab 4/lab 4/деньги.c @@ -0,0 +1,18 @@ +//#include +// +//void main(){ +// int sum; +// int year; +// float percent; +// printf("summa = "); +// scanf_s("%d", &sum); +// +// printf("procent = "); +// scanf_s("%f", &percent); +// year = 0; +// do { +// printf("%d RUB in %d year\n", sum, year); +// sum = (sum * (100 + percent)) / 100; +// year++; +// } while (year <= 10); +//} \ No newline at end of file diff --git a/lab 4/lab 4/месяца.c b/lab 4/lab 4/месяца.c new file mode 100644 index 0000000..d9d600d --- /dev/null +++ b/lab 4/lab 4/месяца.c @@ -0,0 +1,26 @@ +//#include +//#include +//void main() { +// SetConsoleCP(1251); +// SetConsoleOutputCP(1251); +// int i; +// int n; +// int a; +// int f; +// +// printf("n = "); +// scanf_s("%d", &n); +// printf(" = "); +// scanf_s("%d", &f); +// +// +// i = 0; +// a = 36; +// do { +// printf("%d ", n); +// n = n + f; +// i++; +// } while (i < a); +// +// +//} \ No newline at end of file diff --git a/lab 4/lab 4/популяция.c b/lab 4/lab 4/популяция.c new file mode 100644 index 0000000..c5b9853 --- /dev/null +++ b/lab 4/lab 4/популяция.c @@ -0,0 +1,13 @@ +//#include +//void main() { +// int year = 2024; +// int population = 5000; +// +// do { +// printf("%d inhabitants live in the city in %d\n", +// population, year); +// population = (population * 103) / 100; +// year = year + 1; +// } while (year <= 2040); +// +//} \ No newline at end of file diff --git a/lab 4/lab 4/фиббоначи.c b/lab 4/lab 4/фиббоначи.c new file mode 100644 index 0000000..55a1e3f --- /dev/null +++ b/lab 4/lab 4/фиббоначи.c @@ -0,0 +1,27 @@ +//#include +// +//void main() { +// int a; +// int s; +// int c; +// int d; +// int r; +// +// printf("a = "); +// scanf_s("%d", &a); +// +// s = 0; +// c = 1; +// d = 0; +// r = 0; +// do { +// printf("%d ", s); +// r = c + s ; +// c = s; +// s = r; +// d++; +// } while (d < a); +// +// +// +//} \ No newline at end of file