elágazások
This commit is contained in:
parent
f79b26a874
commit
304e6b6683
|
@ -5,6 +5,10 @@ VisualStudioVersion = 16.0.33529.622
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElsoProjekt", "ElsoProjekt\ElsoProjekt.csproj", "{B3E0845E-8C01-4D7B-85E4-12669997FE61}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bevitel_gyak_0301", "bevitel_gyak_0301\bevitel_gyak_0301.csproj", "{6C714AB0-01F5-4AD3-9451-B0731B9BE904}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "szokoev_gyak_0301", "szokoev_gyak_0301\szokoev_gyak_0301.csproj", "{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -15,6 +19,14 @@ Global
|
|||
{B3E0845E-8C01-4D7B-85E4-12669997FE61}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B3E0845E-8C01-4D7B-85E4-12669997FE61}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B3E0845E-8C01-4D7B-85E4-12669997FE61}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6C714AB0-01F5-4AD3-9451-B0731B9BE904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6C714AB0-01F5-4AD3-9451-B0731B9BE904}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6C714AB0-01F5-4AD3-9451-B0731B9BE904}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6C714AB0-01F5-4AD3-9451-B0731B9BE904}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
6
bevitel_gyak_0301/App.config
Normal file
6
bevitel_gyak_0301/App.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
34
bevitel_gyak_0301/Bevitel.cs
Normal file
34
bevitel_gyak_0301/Bevitel.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bevitel_gyak_0301
|
||||
{
|
||||
class Bevitel
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//Adat bekérése felhasználótól
|
||||
Console.WriteLine("Adjon meg egy szöveget");
|
||||
string szoveg= Console.ReadLine(); // Ezt mindig üresen kell hagyni.
|
||||
Console.WriteLine("Ezt írta be:" +szoveg);
|
||||
//bevitel számmá alakítás
|
||||
Console.WriteLine("Adjon meg egy egész számot!");
|
||||
string szoveg2 = Console.ReadLine();
|
||||
int szam2 = int.Parse(szoveg2); // intre való átalakítás (Explicit átalakítás)
|
||||
int szam2convert = Convert.ToInt32(szoveg2);// Ugyan azt jelenti mint a int.Parse(szoveg2)
|
||||
Console.WriteLine("Ezt a számot írta be: "+ szam2); // Inplicit átalakítás
|
||||
int negyzet2 = szam2 * szam2;
|
||||
Console.WriteLine("A szám négyzete:"+negyzet2);
|
||||
string szovegszam = szam2.ToString();
|
||||
double szam2valos = szam2;
|
||||
Console.WriteLine("A szám valós formában"+szam2valos);
|
||||
Console.Write("Adjon meg egy valós számot: "); // A kurzor ott fog várni a sor végén
|
||||
double valos1 = double.Parse(Console.ReadLine());
|
||||
Console.WriteLine("A valós szám: "+ valos1);
|
||||
int egeszvalosbol = (int)valos1;
|
||||
}
|
||||
}
|
||||
}
|
36
bevitel_gyak_0301/Properties/AssemblyInfo.cs
Normal file
36
bevitel_gyak_0301/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("bevitel_gyak_0301")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("bevitel_gyak_0301")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("6c714ab0-01f5-4ad3-9451-b0731b9be904")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
53
bevitel_gyak_0301/bevitel_gyak_0301.csproj
Normal file
53
bevitel_gyak_0301/bevitel_gyak_0301.csproj
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{6C714AB0-01F5-4AD3-9451-B0731B9BE904}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>bevitel_gyak_0301</RootNamespace>
|
||||
<AssemblyName>bevitel_gyak_0301</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Bevitel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
6
szokoev_gyak_0301/App.config
Normal file
6
szokoev_gyak_0301/App.config
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
61
szokoev_gyak_0301/Program.cs
Normal file
61
szokoev_gyak_0301/Program.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace szokoev_gyak_0301
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Adja meg az évet:");
|
||||
int ev = int.Parse(Console.ReadLine());
|
||||
if (ev % 4 == 0)
|
||||
{
|
||||
if (ev % 100 != 0)
|
||||
{
|
||||
Console.WriteLine("Szökőév");
|
||||
} else
|
||||
{
|
||||
if (ev % 400 == 0)
|
||||
{
|
||||
Console.WriteLine("Szökőév");
|
||||
}else
|
||||
{
|
||||
Console.WriteLine("Nem szökőév");
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
Console.WriteLine("Nem szökőév");
|
||||
}
|
||||
// rövid vonal
|
||||
bool szoko = false;
|
||||
if (ev % 400 == 0 || (ev % 4==0 && ev % 100!=0))
|
||||
{
|
||||
Console.WriteLine("Szökőév");
|
||||
szoko = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Nem szökőév");
|
||||
}
|
||||
Console.WriteLine("Adja meg a hónapot:");
|
||||
|
||||
int ho = int.Parse(Console.ReadLine());
|
||||
int napok = 0;
|
||||
if (ho == 1 || ho == 3 || ho == 5 || ho == 7 || ho == 8 || ho == 10 || ho == 12)
|
||||
{
|
||||
napok = 31;
|
||||
} else if (ho == 4 || ho == 6 || ho == 9 || ho == 11)
|
||||
{
|
||||
napok = 30;
|
||||
} else if (ho == 2) ;
|
||||
{
|
||||
napok = szoko ? 29 : 28; // Mini elágazás
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
36
szokoev_gyak_0301/Properties/AssemblyInfo.cs
Normal file
36
szokoev_gyak_0301/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("szokoev_gyak_0301")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("szokoev_gyak_0301")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("dfd593ca-d558-4fb7-abbb-8144db35ed63")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
53
szokoev_gyak_0301/szokoev_gyak_0301.csproj
Normal file
53
szokoev_gyak_0301/szokoev_gyak_0301.csproj
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DFD593CA-D558-4FB7-ABBB-8144DB35ED63}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>szokoev_gyak_0301</RootNamespace>
|
||||
<AssemblyName>szokoev_gyak_0301</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user