This commit is contained in:
Honor 2024-11-12 12:11:42 +04:00
parent b463169bc4
commit fafdd34371
9 changed files with 341 additions and 0 deletions

31
lab 4/lab 4.sln Normal file
View File

@ -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

23
lab 4/lab 4/lab 4.c Normal file
View File

@ -0,0 +1,23 @@
//#include <stdio.h>
//#include <Windows.h>
//
//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);
//
//}

140
lab 4/lab 4/lab 4.vcxproj Normal file
View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{d74fee26-df5c-43b3-8dcd-43dfee8c005b}</ProjectGuid>
<RootNamespace>lab4</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="lab 4.c" />
<ClCompile Include="n четные.c" />
<ClCompile Include="деньги.c" />
<ClCompile Include="месяца.c" />
<ClCompile Include="популяция.c" />
<ClCompile Include="фиббоначи.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Исходные файлы">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Файлы заголовков">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Файлы ресурсов">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="lab 4.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="n четные.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="деньги.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="популяция.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="фиббоначи.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
<ClCompile Include="месяца.c">
<Filter>Исходные файлы</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,26 @@
//#include <stdio.h>
//#include <Windows.h>
//
//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);
//
//}

View File

@ -0,0 +1,18 @@
//#include<stdio.h>
//
//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);
//}

View File

@ -0,0 +1,26 @@
//#include<stdio.h>
//#include<Windows.h>
//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);
//
//
//}

View File

@ -0,0 +1,13 @@
//#include <stdio.h>
//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);
//
//}

View File

@ -0,0 +1,27 @@
//#include<stdio.h>
//
//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);
//
//
//
//}