Добавлен проект
This commit is contained in:
parent
8cdf7e4cac
commit
682fac9b6e
31
лаб 2/лаб 2.sln
Normal file
31
лаб 2/лаб 2.sln
Normal file
@ -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
|
119
лаб 2/лаб 2/FileName.cpp
Normal file
119
лаб 2/лаб 2/FileName.cpp
Normal file
@ -0,0 +1,119 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <Windows.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
135
лаб 2/лаб 2/лаб 2.vcxproj
Normal file
135
лаб 2/лаб 2/лаб 2.vcxproj
Normal file
@ -0,0 +1,135 @@
|
||||
<?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>{c9813538-4654-497e-80e2-34f5d7b435b7}</ProjectGuid>
|
||||
<RootNamespace>лаб2</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="FileName.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
лаб 2/лаб 2/лаб 2.vcxproj.filters
Normal file
22
лаб 2/лаб 2/лаб 2.vcxproj.filters
Normal file
@ -0,0 +1,22 @@
|
||||
<?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="FileName.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user