diff --git a/Lottoszamok.slnx b/Lottoszamok.slnx new file mode 100644 index 0000000..7c51776 --- /dev/null +++ b/Lottoszamok.slnx @@ -0,0 +1,3 @@ + + + diff --git a/Lottoszamok/App.config b/Lottoszamok/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Lottoszamok/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Lottoszamok/Lottoszamok.csproj b/Lottoszamok/Lottoszamok.csproj new file mode 100644 index 0000000..78b7f43 --- /dev/null +++ b/Lottoszamok/Lottoszamok.csproj @@ -0,0 +1,56 @@ + + + + + Debug + AnyCPU + {C4D194DB-89FD-448B-9D3E-B5E9B7E355EE} + Exe + Lottoszamok + Lottoszamok + 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/Lottoszamok/Program.cs b/Lottoszamok/Program.cs new file mode 100644 index 0000000..37ac566 --- /dev/null +++ b/Lottoszamok/Program.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Lottoszamok +{ + internal class Program + { + static void Main(string[] args) + { + + + Console.WriteLine("1.Feladat"); + Console.WriteLine("Kérem az 52. hét hiányzó számait"); + + + string bekertszamok = Console.ReadLine(); + + List lottoszamok = new List(); + + StreamReader sr = new StreamReader(@"..\..\lottosz.txt"); + + while (!sr.EndOfStream) + { + lottoszamok.Add(sr.ReadLine()); + } + sr.Close(); + + + + + bekertszamok = bekertszamok.Trim(); + List bekertszamokdb_olva = bekertszamok.Split(' ').ToList(); + bekertszamokdb_olva.Sort(); + + bekertszamok = ""; + foreach (var szam in bekertszamokdb_olva) + { + bekertszamok = bekertszamok + ' ' + szam.ToString(); + } + bekertszamok = bekertszamok.Trim(); + + + + Console.WriteLine($"A számok rendezve: {bekertszamok}"); + Console.WriteLine("3.Feladat"); + Console.WriteLine("Add meg melyik hetet vetítsem"); + int valasztotthet = int.Parse(Console.ReadLine()); + Console.WriteLine($"4.Feladat\nA választott hét lottószámai: {lottoszamok[valasztotthet]}"); + + + List huzhatoszamok = new List(); + + for (int i = 1; i < 91; i++) + { + huzhatoszamok.Add(i); + } + + + + List latottszamok = new List(); + + foreach (var item in lottoszamok) + { + + string[] szamfelbontvatemp = item.Split(' '); + + foreach (var item1 in szamfelbontvatemp) + { + if (!latottszamok.Contains(int.Parse(item1))) + { + latottszamok.Add(int.Parse(item1)); + } + } + + + + + } + + foreach (var item in lottoszamok) + //ezeket a lottoszámokat még fel kell darabolni + { + if (!latottszamok.Contains(int.Parse(item))) + { + Console.WriteLine($"nem látott szám: {item}"); + } + } + + + + + //5.feladat maj megy ide + + + + + + + + + + + + + + + /* + foreach (var item in lottoszamok) + { + Console.WriteLine(item); + } + */ + + StreamWriter sw = new StreamWriter(@"..\..\lotto52.txt"); + + + /* + sw.Write($"\n{bekertszamok}"); + sw.Close(); + */ + + } + } +} diff --git a/Lottoszamok/Properties/AssemblyInfo.cs b/Lottoszamok/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..02579ae --- /dev/null +++ b/Lottoszamok/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +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("Lottoszamok")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Lottoszamok")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[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("c4d194db-89fd-448b-9d3e-b5e9b7e355ee")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Lottoszamok/lotto52.txt b/Lottoszamok/lotto52.txt new file mode 100644 index 0000000..e69de29 diff --git a/Lottoszamok/lottosz.txt b/Lottoszamok/lottosz.txt new file mode 100644 index 0000000..f83f674 --- /dev/null +++ b/Lottoszamok/lottosz.txt @@ -0,0 +1,51 @@ +37 42 44 61 62 +18 42 54 83 89 +5 12 31 53 60 +1 28 47 56 70 +54 56 57 59 71 +7 21 33 39 86 +21 29 37 48 68 +10 21 29 40 87 +13 33 73 77 78 +2 23 65 71 84 +3 21 28 30 33 +23 31 42 73 85 +4 23 42 61 64 +17 60 66 71 85 +12 60 66 67 72 +46 50 58 62 76 +20 32 43 65 73 +55 56 58 61 71 +18 38 41 67 89 +32 41 59 66 79 +25 35 37 74 86 +1 45 60 61 82 +7 20 35 58 83 +7 37 40 46 51 +2 6 47 74 80 +1 5 22 44 88 +23 33 34 71 89 +4 56 74 77 89 +17 18 51 52 75 +7 29 30 77 80 +17 18 28 35 90 +6 24 25 53 79 +7 12 18 38 90 +25 28 45 55 74 +10 29 60 74 86 +7 24 25 50 76 +20 40 52 54 90 +16 30 81 83 87 +20 22 23 50 67 +59 68 75 80 85 +32 45 55 70 78 +13 40 55 56 76 +3 14 24 73 83 +23 25 28 66 76 +24 33 34 39 54 +12 28 34 61 70 +1 4 8 69 74 +4 15 46 49 59 +24 31 67 71 73 +12 26 36 46 49 +9 20 21 59 68 \ No newline at end of file