43243
This commit is contained in:
parent
abffc7bdba
commit
6f1fe862ce
23
lab 4/lab 4/lab 4.c
Normal file
23
lab 4/lab 4/lab 4.c
Normal 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
140
lab 4/lab 4/lab 4.vcxproj
Normal 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>
|
37
lab 4/lab 4/lab 4.vcxproj.filters
Normal file
37
lab 4/lab 4/lab 4.vcxproj.filters
Normal 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>
|
26
lab 4/lab 4/n четные.c
Normal file
26
lab 4/lab 4/n четные.c
Normal 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);
|
||||
//
|
||||
//}
|
18
lab 4/lab 4/деньги.c
Normal file
18
lab 4/lab 4/деньги.c
Normal 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);
|
||||
//}
|
26
lab 4/lab 4/месяца.c
Normal file
26
lab 4/lab 4/месяца.c
Normal 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);
|
||||
//
|
||||
//
|
||||
//}
|
13
lab 4/lab 4/популяция.c
Normal file
13
lab 4/lab 4/популяция.c
Normal 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);
|
||||
//
|
||||
//}
|
27
lab 4/lab 4/фиббоначи.c
Normal file
27
lab 4/lab 4/фиббоначи.c
Normal 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);
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
Loading…
Reference in New Issue
Block a user