diff --git a/ElsoProjekt.sln b/ElsoProjekt.sln index a9ae237..c331f66 100644 --- a/ElsoProjekt.sln +++ b/ElsoProjekt.sln @@ -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 diff --git a/bevitel_gyak_0301/App.config b/bevitel_gyak_0301/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/bevitel_gyak_0301/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bevitel_gyak_0301/Bevitel.cs b/bevitel_gyak_0301/Bevitel.cs new file mode 100644 index 0000000..c4c375e --- /dev/null +++ b/bevitel_gyak_0301/Bevitel.cs @@ -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; + } + } +} diff --git a/bevitel_gyak_0301/Properties/AssemblyInfo.cs b/bevitel_gyak_0301/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..649b4be --- /dev/null +++ b/bevitel_gyak_0301/Properties/AssemblyInfo.cs @@ -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")] diff --git a/bevitel_gyak_0301/bevitel_gyak_0301.csproj b/bevitel_gyak_0301/bevitel_gyak_0301.csproj new file mode 100644 index 0000000..aea704c --- /dev/null +++ b/bevitel_gyak_0301/bevitel_gyak_0301.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {6C714AB0-01F5-4AD3-9451-B0731B9BE904} + Exe + bevitel_gyak_0301 + bevitel_gyak_0301 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/szokoev_gyak_0301/App.config b/szokoev_gyak_0301/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/szokoev_gyak_0301/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/szokoev_gyak_0301/Program.cs b/szokoev_gyak_0301/Program.cs new file mode 100644 index 0000000..c7b3618 --- /dev/null +++ b/szokoev_gyak_0301/Program.cs @@ -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 + } + } + } +} diff --git a/szokoev_gyak_0301/Properties/AssemblyInfo.cs b/szokoev_gyak_0301/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e91b3ef --- /dev/null +++ b/szokoev_gyak_0301/Properties/AssemblyInfo.cs @@ -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")] diff --git a/szokoev_gyak_0301/szokoev_gyak_0301.csproj b/szokoev_gyak_0301/szokoev_gyak_0301.csproj new file mode 100644 index 0000000..76b37f9 --- /dev/null +++ b/szokoev_gyak_0301/szokoev_gyak_0301.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {DFD593CA-D558-4FB7-ABBB-8144DB35ED63} + Exe + szokoev_gyak_0301 + szokoev_gyak_0301 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file