diff --git a/20250109/C#.pptx b/20250109/C#.pptx new file mode 100644 index 0000000..bc1e663 Binary files /dev/null and b/20250109/C#.pptx differ diff --git a/20250109/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/9cd64189-055f-4c69-b32c-9fe42b027924.vsidx b/20250109/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/9cd64189-055f-4c69-b32c-9fe42b027924.vsidx new file mode 100644 index 0000000..b1573c6 Binary files /dev/null and b/20250109/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/9cd64189-055f-4c69-b32c-9fe42b027924.vsidx differ diff --git a/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/.suo b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/.suo new file mode 100644 index 0000000..333f530 Binary files /dev/null and b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/.suo differ diff --git a/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..ba4f3dd --- /dev/null +++ b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{384B95C5-77D4-4CC8-86E2-D39132973D06}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250109\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{384B95C5-77D4-4CC8-86E2-D39132973D06}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAD8AAAAAAAAAAAAqwFcAAAAiAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-09T07:16:29.377Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json new file mode 100644 index 0000000..7c67466 --- /dev/null +++ b/20250109/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{384B95C5-77D4-4CC8-86E2-D39132973D06}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250109\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{384B95C5-77D4-4CC8-86E2-D39132973D06}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250109\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAD8AAAAAAAAAAAAQwEgAAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-09T07:16:29.377Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250109/ConsoleApp1/ConsoleApp1.sln b/20250109/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..e7ccdf3 --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{384B95C5-77D4-4CC8-86E2-D39132973D06}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {384B95C5-77D4-4CC8-86E2-D39132973D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {384B95C5-77D4-4CC8-86E2-D39132973D06}.Debug|Any CPU.Build.0 = Debug|Any CPU + {384B95C5-77D4-4CC8-86E2-D39132973D06}.Release|Any CPU.ActiveCfg = Release|Any CPU + {384B95C5-77D4-4CC8-86E2-D39132973D06}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DD6E9B96-D2BD-4E54-B4FC-B63016DC2BE5} + EndGlobalSection +EndGlobal diff --git a/20250109/ConsoleApp1/ConsoleApp1/App.config b/20250109/ConsoleApp1/ConsoleApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250109/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/20250109/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..9c1844a --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {384B95C5-77D4-4CC8-86E2-D39132973D06} + Exe + ConsoleApp1 + ConsoleApp1 + 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/20250109/ConsoleApp1/ConsoleApp1/Program.cs b/20250109/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..587099e --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConsoleApp1 +{ + internal class Program + { + static void TombKiir(int[] tomb) + { + foreach (int i in tomb) + { + Console.Write($"{i}, "); + } + Console.WriteLine(); + } + + public static void Gyorsrendez(int[] tomb, int eleje, int vege) + { + if (eleje < vege) { + int kozepe = Feloszt(tomb, eleje, vege); + Gyorsrendez(tomb, eleje, kozepe - 1); + Gyorsrendez(tomb, kozepe + 1, vege); + } + } + + public static int Feloszt(int[] tomb, int eleje, int vege) + { + int kozepe = tomb[vege]; + int kozepindex = eleje; + + for (int i = eleje; i < vege; i++) + { + if (tomb[i] <= kozepe) + { + int temp = tomb[i]; + tomb[i] = tomb[kozepindex]; + tomb[kozepindex] = temp; + kozepindex++; + } + } + + int kozepindexErteke = tomb[kozepindex]; + tomb[kozepindex] = tomb[vege]; + tomb[vege] = kozepindexErteke; + return kozepindex; + } + + public static Int64 Faktorialis(Int64 szam) + { + if (szam == 1) + { + return 1; + } + + return szam * Faktorialis(szam - 1); + } + + public static Int64 Fib(Int64 num) + { + if (num == 1) + { + return 1; + } + + if (num == 0) + { + return 0; + } + + return Fib(num - 1) + Fib(num - 2); + } + + static void Main(string[] args) + { + /* + var tomb = new int[] { 9, 6, 0, 0, 1, 2, 2, 2, 3, 1, 5, 4, 8, 2, 8, 6 }; + + Console.WriteLine("Rendezés előtt: "); + TombKiir(tomb); + + Console.WriteLine("Gyors rendezés: "); + Gyorsrendez(tomb, 0, tomb.Length - 1); + TombKiir(tomb); + */ + + for (int i = 1; i < 20; i++) + { + //Console.WriteLine($"{i}. faktoriális {Faktorialis(i)}"); + Console.WriteLine($"{i}. fibonacci: {Fib(i)} "); + } + + + Console.ReadLine(); + } + } +} diff --git a/20250109/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs b/20250109/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d8e1a7d --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/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("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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("384b95c5-77d4-4cc8-86e2-d39132973d06")] + +// 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/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..ad3c7c7 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe differ diff --git a/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..5353b58 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb differ diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache differ diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..58d080a --- /dev/null +++ b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250109\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..ad3c7c7 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe differ diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..5353b58 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb differ diff --git a/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2c2cab9 Binary files /dev/null and b/20250109/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250109/Gyorsrend.pdf b/20250109/Gyorsrend.pdf new file mode 100644 index 0000000..513c29a Binary files /dev/null and b/20250109/Gyorsrend.pdf differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/13101aa6-772e-4902-ba33-e2871dcce1ba.vsidx b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/13101aa6-772e-4902-ba33-e2871dcce1ba.vsidx new file mode 100644 index 0000000..064d45b Binary files /dev/null and b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/13101aa6-772e-4902-ba33-e2871dcce1ba.vsidx differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/4066a62d-da33-4fbe-b1d2-2f551fb65594.vsidx b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/4066a62d-da33-4fbe-b1d2-2f551fb65594.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/20250115/ConsoleApp1/.vs/ConsoleApp1/FileContentIndex/4066a62d-da33-4fbe-b1d2-2f551fb65594.vsidx differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo new file mode 100644 index 0000000..35557e1 Binary files /dev/null and b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/.suo differ diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..70b0187 --- /dev/null +++ b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250115\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAG8BAAAAAAAAAAAqwIMBAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-15T11:04:49.38Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json new file mode 100644 index 0000000..2f463cc --- /dev/null +++ b/20250115/ConsoleApp1/.vs/ConsoleApp1/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250115\\consoleapp1\\consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1253C52B-9EE2-419E-8ACF-C9DB566348E9}|ConsoleApp1\\ConsoleApp1.csproj|solutionrelative:consoleapp1\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeDocumentMoniker": "ConsoleApp1\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250115\\ConsoleApp1\\ConsoleApp1\\Program.cs", + "RelativeToolTip": "ConsoleApp1\\Program.cs", + "ViewState": "AgIAAIEBAAAAAAAAAAAqwIEBAAAqAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-15T11:04:49.38Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1.sln b/20250115/ConsoleApp1/ConsoleApp1.sln new file mode 100644 index 0000000..c6e151b --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{1253C52B-9EE2-419E-8ACF-C9DB566348E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5A66E34C-F969-4135-ADD8-93ABDBB4CB3A} + EndGlobalSection +EndGlobal diff --git a/20250115/ConsoleApp1/ConsoleApp1/App.config b/20250115/ConsoleApp1/ConsoleApp1/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj b/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj new file mode 100644 index 0000000..8c44f60 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/ConsoleApp1.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {1253C52B-9EE2-419E-8ACF-C9DB566348E9} + Exe + ConsoleApp1 + ConsoleApp1 + 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/20250115/ConsoleApp1/ConsoleApp1/Program.cs b/20250115/ConsoleApp1/ConsoleApp1/Program.cs new file mode 100644 index 0000000..9341440 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/Program.cs @@ -0,0 +1,402 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.Contracts; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using System.Xml; + +namespace ConsoleApp1 +{ + public class ListaElem + { + public ListaElem Next { get; set; } + public T Value { get; set; } + } + + public class LancoltLista: IEnumerable + { + public ListaElem Start { get; private set; } + public ListaElem End { get; private set; } + + public void Add(T value) + { + var next = new ListaElem { Value = value }; + + if (Start == null) + { + Start = next; + End = next; + } else + { + End.Next = next; + End = next; + } + } + + private bool Equals(T value, T other) + { + if (ReferenceEquals(value, other)) + { + return true; + } else + { + return value.Equals(other); + } + + } + + public bool Remove(T value) + { + ListaElem previous = null; + ListaElem current = Start; + + while (current != null) + { + if (Equals(current.Value, value)) + { + if (previous != null) + { + previous.Next = current.Next; + if (current.Next == null) + { + End = previous; + } + } + else + { + Start = Start.Next; + if (Start == null) + { + End = null; + } + } + return true; + } + previous = current; + current = current.Next; + } + + return false; + } + + + public bool Contains(T value) + { + var current = Start; + + while (current != null) + { + if (Equals(current.Value, value)) + { + return true; + } + current = current.Next; + } + return false; + } + + public IEnumerator GetEnumerator() + { + var current = Start; + + while (current != null) + { + var retval = current.Value; + current = current.Next; + yield return retval; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + public class Verem : IEnumerable + { + private List _lista; + + public Verem() + { + _lista = new List(); + } + + public void Push(T value) + { + _lista.Add(value); + } + + int Count + { + get { return _lista.Count; } + } + + public T Pop() + { + int vege = _lista.Count - 1; + T ret = _lista[vege]; + _lista.RemoveAt(vege); + return ret; + } + + public T Peak() + { + int vege = _lista.Count - 1; + return _lista[vege]; + } + + public IEnumerator GetEnumerator() + { + for (int i = _lista.Count - 1; i >= 0; i--) + { + yield return _lista[i]; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } + + public class Csomopont + { + public int Adat { get; set; } + public Csomopont Bal { get; set; } + public Csomopont Jobb { get; set; } + + public Csomopont(int adat) + { + this.Adat = adat; + this.Bal = null; + this.Jobb = null; + } + } + + public class BinarisFa + { + public Csomopont Gyoker { get; private set; } + + public void Add(int adat) + { + Gyoker = AddRekurziv(Gyoker, adat); + } + + private Csomopont AddRekurziv(Csomopont csomopont, int adat) + { + if (csomopont == null) + { + return new Csomopont(adat); + } + + if (adat < csomopont.Adat) + { + csomopont.Bal = AddRekurziv(csomopont.Bal, adat); + } + + if (adat > csomopont.Adat) + { + csomopont.Jobb = AddRekurziv(csomopont.Jobb, adat); + } + + return csomopont; + } + + public void InorderBejaras() + { + Console.WriteLine("Inorder bejárás:"); + InorderRekurziv(Gyoker); + Console.WriteLine(); + } + + private void InorderRekurziv(Csomopont csomopont) + { + if (csomopont == null) + { + return; + } + + InorderRekurziv(csomopont.Bal); + Console.WriteLine($"{csomopont.Adat}, "); + InorderRekurziv(csomopont.Jobb); + } + } + internal class Program + { + public static int BinarisKereses(int[] arr, int value) + { + int eleje = 0; + int vege = arr.Length - 1; + while (eleje <= vege) + { + int i = (eleje + vege) / 2; + if (arr[i] == value) + { + return i; + } + + else if (arr[i] < value) + { + eleje = i + 1; + } + + else if (arr[i] > value) { + vege = i - 1; + } + } + return -1; + } + + public static int[] Buborekrendezes(int[] arr) + { + for (int i = arr.Length - 1; i > 0; i--) + { + for (int j = 0; j < i; j++) + { + if (arr[j] > arr[i]) + { + int tmp = arr[j]; + arr[j] = arr[i]; + arr[i] = tmp; + } + } + } + + return arr; + } + + public static int[] BeszuroRendez(int[] arr) { + for (int i = 1; i < arr.Length; i++) + { + int j = i - 1; + var temp = arr[i]; + while ((j >= 0) && arr[j] > temp) + { + arr[j + 1] = arr[j]; + j--; + } + arr[j + 1] = temp; + } + return arr; + } + + public static void Gyorsrendez(int[] tomb, int eleje, int vege) + { + if (eleje < vege) + { + int kozepe = Feloszt(tomb, eleje, vege); + Gyorsrendez(tomb, eleje, kozepe - 1); + Gyorsrendez(tomb, kozepe + 1, vege); + } + } + + public static int Feloszt(int[] tomb, int eleje, int vege) + { + int kozepe = tomb[vege]; + int kozepindex = eleje; + + for (int i = eleje; i < vege; i++) + { + if (tomb[i] <= kozepe) + { + int temp = tomb[i]; + tomb[i] = tomb[kozepindex]; + tomb[kozepindex] = temp; + kozepindex++; + } + } + + int kozepindexErteke = tomb[kozepindex]; + tomb[kozepindex] = tomb[vege]; + tomb[vege] = kozepindexErteke; + return kozepindex; + } + static void Main(string[] args) + { + var lancolt = new LancoltLista(); + + lancolt.Add(1); + lancolt.Add(2); + lancolt.Add(3); + lancolt.Add(4); + lancolt.Add(5); + + foreach (var item in lancolt) + { + Console.WriteLine(item); + } + + lancolt.Remove(1); + + foreach (var item in lancolt) + { + Console.WriteLine(item); + } + + var verem = new Verem(); + verem.Push(11); + verem.Push(12); + verem.Push(13); + verem.Push(14); + verem.Push(15); + + Console.WriteLine("A verem elemei: "); + foreach (var item in verem) + { + Console.WriteLine(item); + } + + Console.WriteLine("Pop:"); + Console.WriteLine(verem.Pop()); + + BinarisFa binarisFa = new BinarisFa(); + binarisFa.Add(5); + binarisFa.Add(2); + binarisFa.Add(8); + binarisFa.Add(1); + binarisFa.Add(7); + + binarisFa.InorderBejaras(); + + int[] tomb = { 1, 12, 5, 6, 7, 3, 4, 2, 10, 11, 9, 8 }; + + Console.WriteLine("Tömb: "); + foreach (var item in tomb) + { + Console.Write($"{item} "); + } + Console.WriteLine(); + Console.WriteLine($"a 4-es elem indexe: {BinarisKereses(tomb, 4)}"); + + Console.Write($"A tömb buborékrendezve:"); + int[] bubi = Buborekrendezes(tomb); + foreach (var item in bubi) + { + Console.Write($"{item} "); + } + int[] beszuro = BeszuroRendez(tomb); + Console.WriteLine(); + Console.WriteLine("Beszuro rendez: "); + foreach (var item in beszuro) + { + Console.Write($"{item} "); + } + Console.WriteLine(); + + Console.WriteLine("Gyorsrendezés: "); + Gyorsrendez(tomb, 0, tomb.Length - 1); + foreach (var item in tomb) + { + Console.Write($"{item} "); + } + + + Console.ReadKey(); + } + + } +} diff --git a/20250115/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs b/20250115/ConsoleApp1/ConsoleApp1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3f6bb73 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/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("ConsoleApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConsoleApp1")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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("1253c52b-9ee2-419e-8acf-c9db566348e9")] + +// 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/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..6282590 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..657e04e Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/bin/Debug/ConsoleApp1.pdb differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.AssemblyReference.cache differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..599107a --- /dev/null +++ b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\bin\Debug\ConsoleApp1.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250115\ConsoleApp1\ConsoleApp1\obj\Debug\ConsoleApp1.pdb diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe new file mode 100644 index 0000000..6282590 Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.exe differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb new file mode 100644 index 0000000..657e04e Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/ConsoleApp1.pdb differ diff --git a/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..20196db Binary files /dev/null and b/20250115/ConsoleApp1/ConsoleApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250115/Feladatok.pdf b/20250115/Feladatok.pdf new file mode 100644 index 0000000..42166c1 Binary files /dev/null and b/20250115/Feladatok.pdf differ diff --git a/20250115/linked_list.cs b/20250115/linked_list.cs new file mode 100644 index 0000000..6bf0066 --- /dev/null +++ b/20250115/linked_list.cs @@ -0,0 +1,22 @@ +using System; +using System.IO; +using System.Collections.Generic; + +namespace LinkedList_Gyak +{ + public Class Lancoltlista{ + public int value; + //public Lancoltlista *pointer; + + public Lancoltlista(int value){ + this.value = value; + } + + } + internal class Program{ + static void Main(string[] args){ + Lancoltlista elem = new Lancoltlista(1); + Console.WriteLine(elem.value); + } + } +} \ No newline at end of file diff --git a/20250122/Gyakorlás.pdf b/20250122/Gyakorlás.pdf new file mode 100644 index 0000000..267274e Binary files /dev/null and b/20250122/Gyakorlás.pdf differ diff --git a/20250122/Kor/.vs/Kor/FileContentIndex/93b5dba3-1312-4bb4-a891-beb0d07b710e.vsidx b/20250122/Kor/.vs/Kor/FileContentIndex/93b5dba3-1312-4bb4-a891-beb0d07b710e.vsidx new file mode 100644 index 0000000..384506c Binary files /dev/null and b/20250122/Kor/.vs/Kor/FileContentIndex/93b5dba3-1312-4bb4-a891-beb0d07b710e.vsidx differ diff --git a/20250122/Kor/.vs/Kor/FileContentIndex/cf0ef274-2be1-4ec4-9627-34a046309a18.vsidx b/20250122/Kor/.vs/Kor/FileContentIndex/cf0ef274-2be1-4ec4-9627-34a046309a18.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/20250122/Kor/.vs/Kor/FileContentIndex/cf0ef274-2be1-4ec4-9627-34a046309a18.vsidx differ diff --git a/20250122/Kor/.vs/Kor/v17/.suo b/20250122/Kor/.vs/Kor/v17/.suo new file mode 100644 index 0000000..90fdc63 Binary files /dev/null and b/20250122/Kor/.vs/Kor/v17/.suo differ diff --git a/20250122/Kor/.vs/Kor/v17/DocumentLayout.backup.json b/20250122/Kor/.vs/Kor/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..2bf3a28 --- /dev/null +++ b/20250122/Kor/.vs/Kor/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|solutionrelative:kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs", + "RelativeDocumentMoniker": "Kor\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs", + "RelativeToolTip": "Kor\\Program.cs", + "ViewState": "AgIAAKgAAAAAAAAAAAAAALsAAAA4AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-22T11:07:50.634Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/Kor/.vs/Kor/v17/DocumentLayout.json b/20250122/Kor/.vs/Kor/v17/DocumentLayout.json new file mode 100644 index 0000000..2bf3a28 --- /dev/null +++ b/20250122/Kor/.vs/Kor/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|solutionrelative:kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs", + "RelativeDocumentMoniker": "Kor\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs", + "RelativeToolTip": "Kor\\Program.cs", + "ViewState": "AgIAAKgAAAAAAAAAAAAAALsAAAA4AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-22T11:07:50.634Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/Kor/Kor.sln b/20250122/Kor/Kor.sln new file mode 100644 index 0000000..adc6311 --- /dev/null +++ b/20250122/Kor/Kor.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kor", "Kor\Kor.csproj", "{08AC5912-8134-4A14-A3EC-C61822BA59AA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {08AC5912-8134-4A14-A3EC-C61822BA59AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08AC5912-8134-4A14-A3EC-C61822BA59AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08AC5912-8134-4A14-A3EC-C61822BA59AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08AC5912-8134-4A14-A3EC-C61822BA59AA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2395C132-B3DA-4C13-A3F5-51E6A89E79F5} + EndGlobalSection +EndGlobal diff --git a/20250122/Kor/Kor/.vs/Kor.csproj.dtbcache.json b/20250122/Kor/Kor/.vs/Kor.csproj.dtbcache.json new file mode 100644 index 0000000..9909f83 --- /dev/null +++ b/20250122/Kor/Kor/.vs/Kor.csproj.dtbcache.json @@ -0,0 +1 @@ +{"RootPath":"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor","ProjectFileName":"Kor.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\bin\\Debug\\Kor.exe","OutputItemRelativePath":"Kor.exe"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]} \ No newline at end of file diff --git a/20250122/Kor/Kor/App.config b/20250122/Kor/Kor/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/Kor/Kor/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/Kor/Kor/Kor.csproj b/20250122/Kor/Kor/Kor.csproj new file mode 100644 index 0000000..b08a9db --- /dev/null +++ b/20250122/Kor/Kor/Kor.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {08AC5912-8134-4A14-A3EC-C61822BA59AA} + Exe + Kor + Kor + 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/20250122/Kor/Kor/Program.cs b/20250122/Kor/Kor/Program.cs new file mode 100644 index 0000000..713d120 --- /dev/null +++ b/20250122/Kor/Kor/Program.cs @@ -0,0 +1,192 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http.Headers; +using System.Runtime.Remoting.Messaging; +using System.Text; +using System.Threading.Tasks; + +namespace Kor +{ + public class Kor + { + public double sugar { get; set; } + + public Kor(double sugar) + { + this.sugar = sugar; + } + + public void Meretvaltoztata(double meret) + { + this.sugar = meret; + } + + public double Kerulet() + { + return sugar * 2 * Math.PI; + } + + public double Terulet() + { + return sugar * sugar * Math.PI; + } + } + + public class SzinesKor : Kor + { + public string szin; + public SzinesKor(double sugar, string szin) : base(sugar) + { + this.sugar = sugar; + this.szin = szin; + } + } + + public class Auto + { + public string nev; + public double fogyasztas; + public double benzintank; + public double MAX_benzintank; + + + public Auto(string nev, double fogyasztas, double benzintank, double MAX_benzintank) { + this.nev = nev; + this.fogyasztas = fogyasztas; + this.benzintank = benzintank; + this.MAX_benzintank = MAX_benzintank; + } + } + + public class Benzinkut + { + public double benzin; //jelenleg tárolt benzin mennyisége + public double literAr; // benzin ára literenként + public double kassza; + + public Benzinkut(double benzin, double literAr, double kassza) + { + this.benzin = benzin; + this.literAr = literAr; + this.kassza = kassza; + } + + public void Tankolas(Auto auto, Sofor sofor) + { + if (benzin - auto.MAX_benzintank > 0 && sofor.penz >= this.literAr * auto.MAX_benzintank) + { + auto.benzintank = auto.MAX_benzintank; + benzin -= auto.MAX_benzintank; + int fizetendo = (int)auto.MAX_benzintank * (int)this.literAr; + sofor.penz -= fizetendo; + this.kassza += fizetendo; + } + } + } + + public class Sofor + { + public string nev; + public int penz; + + public Sofor(string nev, int penz) + { + this.nev = nev; + this.penz = penz; + } + } + + public class Munkavallalo + { + public string nev; + public string fizetesiKategoria; + public int evesSzabadsag; + public int kivettSzabadsag = 0; + + public Munkavallalo(string nev, string fizetesiKategoria) + { + this.nev= nev; + this.fizetesiKategoria = fizetesiKategoria; + } + + public Munkavallalo(string nev, string fizetesiKategoria, int evesSzabadsag) + { + this.nev = nev; + this.fizetesiKategoria = fizetesiKategoria; + this.evesSzabadsag = evesSzabadsag; + } + + public int KivehetoNapokSzama() + { + return evesSzabadsag - kivettSzabadsag; + } + } + + class Szemely + { + public string nev; + public int magassag; + public int kor; + + public Szemely(string nev, int magassag, int kor) + { + this.nev = nev; + this.magassag = magassag; + this.kor = kor; + } + } + + + internal class Program + { + public static bool OsszeIllenek(Szemely szemely1, Szemely szemely2) + { + if ( + Math.Abs(szemely1.magassag - szemely2.magassag) <= 10 + && Math.Abs(szemely1.kor - szemely2.kor) <= 3) + { + return true; + } + return false; + } + static void Main(string[] args) + { + Kor kor = new Kor(1); + Console.WriteLine(kor.Terulet()); + Console.WriteLine(kor.Kerulet()); + Console.WriteLine(); + + SzinesKor szinesKor = new SzinesKor(2, "piros"); + Console.WriteLine(szinesKor.Terulet()); + + Benzinkut benzinkut = new Benzinkut(1000, 500, 0); + Sofor sofor = new Sofor("Sanyi", 100000); + Auto auto = new Auto("Fiat", 5.3, 100, 100); + + /* + while (sofor.penz > 0) { + auto.benzintank = 0; + benzinkut.Tankolas(auto, sofor); + Console.WriteLine($"A sofőr aktuális egyenlege: {sofor.penz}"); + } + */ + + Munkavallalo munkavallalo = new Munkavallalo("Sanyi", "1", 20); + Console.WriteLine(munkavallalo.KivehetoNapokSzama()); + + + //4. feladat + Szemely lany = new Szemely("Anna", 150, 20); + Szemely fiu = new Szemely("Bence", 160, 21); + + if (OsszeIllenek(fiu, lany)) + { + Console.WriteLine("Összeillenek"); + } else + { + Console.WriteLine("Nem illenek össze."); + } + } + } +} diff --git a/20250122/Kor/Kor/Properties/AssemblyInfo.cs b/20250122/Kor/Kor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c01528d --- /dev/null +++ b/20250122/Kor/Kor/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("Kor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Kor")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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("08ac5912-8134-4a14-a3ec-c61822ba59aa")] + +// 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/20250122/Kor/Kor/bin/Debug/Kor.exe b/20250122/Kor/Kor/bin/Debug/Kor.exe new file mode 100644 index 0000000..d8a8a55 Binary files /dev/null and b/20250122/Kor/Kor/bin/Debug/Kor.exe differ diff --git a/20250122/Kor/Kor/bin/Debug/Kor.exe.config b/20250122/Kor/Kor/bin/Debug/Kor.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/Kor/Kor/bin/Debug/Kor.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/Kor/Kor/bin/Debug/Kor.pdb b/20250122/Kor/Kor/bin/Debug/Kor.pdb new file mode 100644 index 0000000..9e9688d Binary files /dev/null and b/20250122/Kor/Kor/bin/Debug/Kor.pdb differ diff --git a/20250122/Kor/Kor/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250122/Kor/Kor/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250122/Kor/Kor/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250122/Kor/Kor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250122/Kor/Kor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..f75a9b6 Binary files /dev/null and b/20250122/Kor/Kor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250122/Kor/Kor/obj/Debug/Kor.csproj.AssemblyReference.cache b/20250122/Kor/Kor/obj/Debug/Kor.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20250122/Kor/Kor/obj/Debug/Kor.csproj.AssemblyReference.cache differ diff --git a/20250122/Kor/Kor/obj/Debug/Kor.csproj.CoreCompileInputs.cache b/20250122/Kor/Kor/obj/Debug/Kor.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20250122/Kor/Kor/obj/Debug/Kor.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20250122/Kor/Kor/obj/Debug/Kor.csproj.FileListAbsolute.txt b/20250122/Kor/Kor/obj/Debug/Kor.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ebfe1ee --- /dev/null +++ b/20250122/Kor/Kor/obj/Debug/Kor.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe.config +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.pdb +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.exe +C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe.config +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.pdb diff --git a/20250122/Kor/Kor/obj/Debug/Kor.exe b/20250122/Kor/Kor/obj/Debug/Kor.exe new file mode 100644 index 0000000..d8a8a55 Binary files /dev/null and b/20250122/Kor/Kor/obj/Debug/Kor.exe differ diff --git a/20250122/Kor/Kor/obj/Debug/Kor.pdb b/20250122/Kor/Kor/obj/Debug/Kor.pdb new file mode 100644 index 0000000..9e9688d Binary files /dev/null and b/20250122/Kor/Kor/obj/Debug/Kor.pdb differ diff --git a/20250122/Statisztika/.vs/Statisztika/FileContentIndex/3134b656-50ff-4728-a5c3-715e21ce9412.vsidx b/20250122/Statisztika/.vs/Statisztika/FileContentIndex/3134b656-50ff-4728-a5c3-715e21ce9412.vsidx new file mode 100644 index 0000000..3cd5725 Binary files /dev/null and b/20250122/Statisztika/.vs/Statisztika/FileContentIndex/3134b656-50ff-4728-a5c3-715e21ce9412.vsidx differ diff --git a/20250122/Statisztika/.vs/Statisztika/v17/.suo b/20250122/Statisztika/.vs/Statisztika/v17/.suo new file mode 100644 index 0000000..18e1f2d Binary files /dev/null and b/20250122/Statisztika/.vs/Statisztika/v17/.suo differ diff --git a/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.backup.json b/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..b3ed070 --- /dev/null +++ b/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.backup.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{47C2D77C-726C-4B42-8A0B-6C68BEC5A588}|Statisztika\\Statisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\statisztika\\statisztika\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{47C2D77C-726C-4B42-8A0B-6C68BEC5A588}|Statisztika\\Statisztika.csproj|solutionrelative:statisztika\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\Statisztika\\Program.cs", + "RelativeDocumentMoniker": "Statisztika\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\Statisztika\\Program.cs", + "RelativeToolTip": "Statisztika\\Program.cs", + "ViewState": "AgIAACMAAAAAAAAAAAAqwDsAAAB+AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-23T07:15:55.093Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.json b/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.json new file mode 100644 index 0000000..b3ed070 --- /dev/null +++ b/20250122/Statisztika/.vs/Statisztika/v17/DocumentLayout.json @@ -0,0 +1,37 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{47C2D77C-726C-4B42-8A0B-6C68BEC5A588}|Statisztika\\Statisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\statisztika\\statisztika\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{47C2D77C-726C-4B42-8A0B-6C68BEC5A588}|Statisztika\\Statisztika.csproj|solutionrelative:statisztika\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\Statisztika\\Program.cs", + "RelativeDocumentMoniker": "Statisztika\\Program.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Statisztika\\Statisztika\\Program.cs", + "RelativeToolTip": "Statisztika\\Program.cs", + "ViewState": "AgIAACMAAAAAAAAAAAAqwDsAAAB+AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-23T07:15:55.093Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/Statisztika/Statisztika.sln b/20250122/Statisztika/Statisztika.sln new file mode 100644 index 0000000..f488ccb --- /dev/null +++ b/20250122/Statisztika/Statisztika.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Statisztika", "Statisztika\Statisztika.csproj", "{47C2D77C-726C-4B42-8A0B-6C68BEC5A588}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47C2D77C-726C-4B42-8A0B-6C68BEC5A588}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47C2D77C-726C-4B42-8A0B-6C68BEC5A588}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47C2D77C-726C-4B42-8A0B-6C68BEC5A588}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47C2D77C-726C-4B42-8A0B-6C68BEC5A588}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2937FA6E-9287-42E7-9F7E-8A1F844E27B5} + EndGlobalSection +EndGlobal diff --git a/20250122/Statisztika/Statisztika/App.config b/20250122/Statisztika/Statisztika/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/Statisztika/Statisztika/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/Statisztika/Statisztika/Program.cs b/20250122/Statisztika/Statisztika/Program.cs new file mode 100644 index 0000000..6e727e6 --- /dev/null +++ b/20250122/Statisztika/Statisztika/Program.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Statisztika +{ + internal class Program + { + public static int Osszeg(List values) + { + return values.Sum(); + } + + public static int Atlag(List values) + { + return values.Sum() / values.Count(); + } + + + static void Main(string[] args) + { + string path = args[0]; + + if (File.Exists(path)) + { + FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + StreamReader streamReader = new StreamReader(fileStream); + + List values = new List(); + string line = streamReader.ReadLine(); + while (line != null) + { + if(Int32.TryParse(line, out int num)) + { + values.Add(num); + } + + + line = streamReader.ReadLine(); + } + + + streamReader.Close(); + fileStream.Close(); + + if (values.Count > 0) + { + Console.WriteLine($"A számok összege: {Osszeg(values)}"); + Console.WriteLine($"A számok átlaga: {Atlag(values)}"); + + StreamWriter streamWriter = new StreamWriter("kimenet.txt"); + streamWriter.WriteLine($"A számok összege: {Osszeg(values)}"); + streamWriter.WriteLine($"A számok átlaga: {Atlag(values)}"); + streamWriter.Close(); + } else + { + Console.WriteLine("ERROR! A megadott fájlba nem szerepeltek számok, vagy azok nem jó formátumba voltak."); + } + + } + else + { + Console.WriteLine("ERROR! A file nem létezik."); + } + + + } + } +} diff --git a/20250122/Statisztika/Statisztika/Properties/AssemblyInfo.cs b/20250122/Statisztika/Statisztika/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c6f7c1c --- /dev/null +++ b/20250122/Statisztika/Statisztika/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("Statisztika")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Statisztika")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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("47c2d77c-726c-4b42-8a0b-6c68bec5a588")] + +// 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/20250122/Statisztika/Statisztika/Statisztika.csproj b/20250122/Statisztika/Statisztika/Statisztika.csproj new file mode 100644 index 0000000..7b51181 --- /dev/null +++ b/20250122/Statisztika/Statisztika/Statisztika.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {47C2D77C-726C-4B42-8A0B-6C68BEC5A588} + Exe + Statisztika + Statisztika + 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/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe new file mode 100644 index 0000000..75522e3 Binary files /dev/null and b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe differ diff --git a/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe.config b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.pdb b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.pdb new file mode 100644 index 0000000..2b5d228 Binary files /dev/null and b/20250122/Statisztika/Statisztika/bin/Debug/Statisztika.pdb differ diff --git a/20250122/Statisztika/Statisztika/bin/Debug/bemenet.txt b/20250122/Statisztika/Statisztika/bin/Debug/bemenet.txt new file mode 100644 index 0000000..f00c965 --- /dev/null +++ b/20250122/Statisztika/Statisztika/bin/Debug/bemenet.txt @@ -0,0 +1,10 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/20250122/Statisztika/Statisztika/bin/Debug/kimenet.txt b/20250122/Statisztika/Statisztika/bin/Debug/kimenet.txt new file mode 100644 index 0000000..7ca6af9 --- /dev/null +++ b/20250122/Statisztika/Statisztika/bin/Debug/kimenet.txt @@ -0,0 +1,2 @@ +A számok összege: 3822 +A számok átlaga: 764 diff --git a/20250122/Statisztika/Statisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250122/Statisztika/Statisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250122/Statisztika/Statisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250122/Statisztika/Statisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250122/Statisztika/Statisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b7517b4 Binary files /dev/null and b/20250122/Statisztika/Statisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.AssemblyReference.cache b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.AssemblyReference.cache new file mode 100644 index 0000000..126ed02 Binary files /dev/null and b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.AssemblyReference.cache differ diff --git a/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.CoreCompileInputs.cache b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0be8d26 --- /dev/null +++ b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509 diff --git a/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.FileListAbsolute.txt b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..bdc3908 --- /dev/null +++ b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.csproj.FileListAbsolute.txt @@ -0,0 +1,7 @@ +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\bin\Debug\Statisztika.exe.config +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\bin\Debug\Statisztika.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\bin\Debug\Statisztika.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\obj\Debug\Statisztika.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\obj\Debug\Statisztika.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\obj\Debug\Statisztika.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Statisztika\Statisztika\obj\Debug\Statisztika.pdb diff --git a/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.exe b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.exe new file mode 100644 index 0000000..75522e3 Binary files /dev/null and b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.exe differ diff --git a/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.pdb b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.pdb new file mode 100644 index 0000000..2b5d228 Binary files /dev/null and b/20250122/Statisztika/Statisztika/obj/Debug/Statisztika.pdb differ diff --git a/20250122/WpfStatisztika/.vs/WpfStatisztika/FileContentIndex/771c349f-b3f8-4c18-af7f-dda8a00ff99e.vsidx b/20250122/WpfStatisztika/.vs/WpfStatisztika/FileContentIndex/771c349f-b3f8-4c18-af7f-dda8a00ff99e.vsidx new file mode 100644 index 0000000..fe71243 Binary files /dev/null and b/20250122/WpfStatisztika/.vs/WpfStatisztika/FileContentIndex/771c349f-b3f8-4c18-af7f-dda8a00ff99e.vsidx differ diff --git a/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/.suo b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/.suo new file mode 100644 index 0000000..7c7f2b9 Binary files /dev/null and b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/.suo differ diff --git a/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.backup.json b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..a0296e8 --- /dev/null +++ b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.backup.json @@ -0,0 +1,53 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\wpfstatisztika\\wpfstatisztika\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|solutionrelative:wpfstatisztika\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\wpfstatisztika\\wpfstatisztika\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|solutionrelative:wpfstatisztika\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MainWindow.xaml.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml.cs", + "RelativeDocumentMoniker": "WpfStatisztika\\MainWindow.xaml.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml.cs", + "RelativeToolTip": "WpfStatisztika\\MainWindow.xaml.cs", + "ViewState": "AgIAAGUAAAAAAAAAAAD4v3QAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-23T08:07:03.78Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "MainWindow.xaml", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml", + "RelativeDocumentMoniker": "WpfStatisztika\\MainWindow.xaml", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml", + "RelativeToolTip": "WpfStatisztika\\MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2025-01-23T08:07:04.079Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.json b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.json new file mode 100644 index 0000000..a0296e8 --- /dev/null +++ b/20250122/WpfStatisztika/.vs/WpfStatisztika/v17/DocumentLayout.json @@ -0,0 +1,53 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\wpfstatisztika\\wpfstatisztika\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|solutionrelative:wpfstatisztika\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\wpfstatisztika\\wpfstatisztika\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{829C5E78-9BC1-473E-8364-B7BBFC4A871C}|WpfStatisztika\\WpfStatisztika.csproj|solutionrelative:wpfstatisztika\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MainWindow.xaml.cs", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml.cs", + "RelativeDocumentMoniker": "WpfStatisztika\\MainWindow.xaml.cs", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml.cs", + "RelativeToolTip": "WpfStatisztika\\MainWindow.xaml.cs", + "ViewState": "AgIAAGUAAAAAAAAAAAD4v3QAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-01-23T08:07:03.78Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "MainWindow.xaml", + "DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml", + "RelativeDocumentMoniker": "WpfStatisztika\\MainWindow.xaml", + "ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\WpfStatisztika\\WpfStatisztika\\MainWindow.xaml", + "RelativeToolTip": "WpfStatisztika\\MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2025-01-23T08:07:04.079Z", + "EditorCaption": "" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika.sln b/20250122/WpfStatisztika/WpfStatisztika.sln new file mode 100644 index 0000000..ae9fe2d --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35222.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfStatisztika", "WpfStatisztika\WpfStatisztika.csproj", "{829C5E78-9BC1-473E-8364-B7BBFC4A871C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {829C5E78-9BC1-473E-8364-B7BBFC4A871C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {829C5E78-9BC1-473E-8364-B7BBFC4A871C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {829C5E78-9BC1-473E-8364-B7BBFC4A871C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {829C5E78-9BC1-473E-8364-B7BBFC4A871C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {86C389D6-1690-441F-A7FD-C4F096B87D5B} + EndGlobalSection +EndGlobal diff --git a/20250122/WpfStatisztika/WpfStatisztika/App.config b/20250122/WpfStatisztika/WpfStatisztika/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika/App.xaml b/20250122/WpfStatisztika/WpfStatisztika/App.xaml new file mode 100644 index 0000000..cf2eeec --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/20250122/WpfStatisztika/WpfStatisztika/App.xaml.cs b/20250122/WpfStatisztika/WpfStatisztika/App.xaml.cs new file mode 100644 index 0000000..80beb3d --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WpfStatisztika +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml b/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml new file mode 100644 index 0000000..dcfeed9 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + bemenet.txt + + + + + + + + + + + + + + + + + + diff --git a/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml.cs b/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml.cs new file mode 100644 index 0000000..e05f1ca --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/MainWindow.xaml.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace WpfStatisztika +{ + /// + /// Interaction logic for MainWindow.xaml + /// + /// + + public partial class MainWindow : Window + { + public static int Osszeg(List values) + { + return values.Sum(); + } + + public static int Atlag(List values) + { + return values.Sum() / values.Count(); + } + + public static int Min(List values) + { + return values.Min(); + } + + public static int Max(List values) + { + return values.Max(); + } + + public void FileRead(string path) + { + if (File.Exists(path)) + { + FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read); + StreamReader streamReader = new StreamReader(fileStream); + + List values = new List(); + string line = streamReader.ReadLine(); + while (line != null) + { + if (Int32.TryParse(line, out int num)) + { + values.Add(num); + } + + + line = streamReader.ReadLine(); + } + + + streamReader.Close(); + fileStream.Close(); + + if (values.Count > 0) + { + osszeg.Content = $"A számok összege: {Osszeg(values)}"; + atlag.Content = $"A számok átlaga: {Atlag(values)}"; + min.Content = $"A legkisebb szám: {Min(values)}"; + max.Content = $"A legnagyobb szám: {Max(values)}"; + + StreamWriter streamWriter = new StreamWriter("kimenet.txt"); + streamWriter.WriteLine($"A számok összege: {Osszeg(values)}"); + streamWriter.WriteLine($"A számok átlaga: {Atlag(values)}"); + streamWriter.WriteLine($"A legkisebb szám: {Min(values)}"); + streamWriter.WriteLine($"A legnagyobb szám: {Max(values)}"); + streamWriter.Close(); + } + else + { + Console.WriteLine("ERROR! A megadott fájlba nem szerepeltek számok, vagy azok nem jó formátumba voltak."); + } + + } + else + { + Console.WriteLine("ERROR! A file nem létezik."); + MessageBox.Show("ERROR! A file nem létezik."); + } + } + public MainWindow() + { + InitializeComponent(); + } + + private void Button_Click(object sender, RoutedEventArgs e) + { + if (input.Text != "") + { + string path = input.Text; + FileRead(path); + } else + { + input.Text = "bemenet.txt"; + string path = input.Text; + FileRead(path); + } + } + + private void Save_Click(object sender, RoutedEventArgs e) + { + + } + } +} + + + + + + + + + + diff --git a/20250122/WpfStatisztika/WpfStatisztika/Properties/AssemblyInfo.cs b/20250122/WpfStatisztika/WpfStatisztika/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7e985b8 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/Properties/AssemblyInfo.cs @@ -0,0 +1,52 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("WpfStatisztika")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WpfStatisztika")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[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)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.Designer.cs b/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ff68c4b --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WpfStatisztika.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WpfStatisztika.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.resx b/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.Designer.cs b/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.Designer.cs new file mode 100644 index 0000000..48115f8 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WpfStatisztika.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.settings b/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika/WpfStatisztika.csproj b/20250122/WpfStatisztika/WpfStatisztika/WpfStatisztika.csproj new file mode 100644 index 0000000..f7481bb --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/WpfStatisztika.csproj @@ -0,0 +1,98 @@ + + + + + Debug + AnyCPU + {829C5E78-9BC1-473E-8364-B7BBFC4A871C} + WinExe + WpfStatisztika + WpfStatisztika + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe new file mode 100644 index 0000000..ff34ce1 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe.config b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.pdb b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.pdb new file mode 100644 index 0000000..0347fd1 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/WpfStatisztika.pdb differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/bemenet.txt b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/bemenet.txt new file mode 100644 index 0000000..0719398 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/bemenet.txt @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/kimenet.txt b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/kimenet.txt new file mode 100644 index 0000000..fdcb5de --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/bin/Debug/kimenet.txt @@ -0,0 +1,4 @@ +A számok összege: 45 +A számok átlaga: 5 +A legkisebb szám: 1 +A legnagyobb szám: 9 diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.cs b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.cs new file mode 100644 index 0000000..7ecc374 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "826EFD9166F0EAB6D4962C7062D27FEB198FAC2C59955A481D4384D031EFA372" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using WpfStatisztika; + + +namespace WpfStatisztika { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + WpfStatisztika.App app = new WpfStatisztika.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.i.cs b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.i.cs new file mode 100644 index 0000000..7ecc374 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/App.g.i.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "826EFD9166F0EAB6D4962C7062D27FEB198FAC2C59955A481D4384D031EFA372" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using WpfStatisztika; + + +namespace WpfStatisztika { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + WpfStatisztika.App app = new WpfStatisztika.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..15d028e Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.baml b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.baml new file mode 100644 index 0000000..fbefecc Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.baml differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.cs b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.cs new file mode 100644 index 0000000..db88092 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.cs @@ -0,0 +1,149 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3C4B7109EE70648A61B5A7EDB33EBEBDFA3EF4868E8D1C4E12CCD35552E9BF69" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using WpfStatisztika; + + +namespace WpfStatisztika { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 29 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox input; + + #line default + #line hidden + + + #line 41 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label osszeg; + + #line default + #line hidden + + + #line 42 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label atlag; + + #line default + #line hidden + + + #line 43 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label min; + + #line default + #line hidden + + + #line 44 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label max; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/WpfStatisztika;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.input = ((System.Windows.Controls.TextBox)(target)); + return; + case 2: + + #line 30 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); + + #line default + #line hidden + return; + case 3: + + #line 31 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Save_Click); + + #line default + #line hidden + return; + case 4: + this.osszeg = ((System.Windows.Controls.Label)(target)); + return; + case 5: + this.atlag = ((System.Windows.Controls.Label)(target)); + return; + case 6: + this.min = ((System.Windows.Controls.Label)(target)); + return; + case 7: + this.max = ((System.Windows.Controls.Label)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.i.cs b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.i.cs new file mode 100644 index 0000000..db88092 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/MainWindow.g.i.cs @@ -0,0 +1,149 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "3C4B7109EE70648A61B5A7EDB33EBEBDFA3EF4868E8D1C4E12CCD35552E9BF69" +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using WpfStatisztika; + + +namespace WpfStatisztika { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 29 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox input; + + #line default + #line hidden + + + #line 41 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label osszeg; + + #line default + #line hidden + + + #line 42 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label atlag; + + #line default + #line hidden + + + #line 43 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label min; + + #line default + #line hidden + + + #line 44 "..\..\MainWindow.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Label max; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/WpfStatisztika;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.input = ((System.Windows.Controls.TextBox)(target)); + return; + case 2: + + #line 30 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); + + #line default + #line hidden + return; + case 3: + + #line 31 "..\..\MainWindow.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Save_Click); + + #line default + #line hidden + return; + case 4: + this.osszeg = ((System.Windows.Controls.Label)(target)); + return; + case 5: + this.atlag = ((System.Windows.Controls.Label)(target)); + return; + case 6: + this.min = ((System.Windows.Controls.Label)(target)); + return; + case 7: + this.max = ((System.Windows.Controls.Label)(target)); + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.Properties.Resources.resources b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.Properties.Resources.resources differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.AssemblyReference.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.AssemblyReference.cache new file mode 100644 index 0000000..7f9ac73 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.AssemblyReference.cache differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.CoreCompileInputs.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..6f8f0b9 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +52053ce3f47fe6196bfbb6134890ffa6609923b710d7c51534150ce82e0d353e diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.FileListAbsolute.txt b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..cda95c0 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\bin\Debug\WpfStatisztika.exe.config +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\bin\Debug\WpfStatisztika.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\bin\Debug\WpfStatisztika.pdb +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.csproj.AssemblyReference.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\MainWindow.g.cs +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\App.g.cs +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika_MarkupCompile.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika_MarkupCompile.lref +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\MainWindow.baml +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.g.resources +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.Properties.Resources.resources +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.csproj.GenerateResource.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.csproj.CoreCompileInputs.cache +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.exe +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\WpfStatisztika.pdb diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.GenerateResource.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.GenerateResource.cache new file mode 100644 index 0000000..36717e0 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.csproj.GenerateResource.cache differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.exe b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.exe new file mode 100644 index 0000000..ff34ce1 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.exe differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.g.resources b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.g.resources new file mode 100644 index 0000000..c616b6c Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.g.resources differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.pdb b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.pdb new file mode 100644 index 0000000..0347fd1 Binary files /dev/null and b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika.pdb differ diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.cache new file mode 100644 index 0000000..2bdc9a6 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.cache @@ -0,0 +1,20 @@ +WpfStatisztika + + +winexe +C# +.cs +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\ +WpfStatisztika +none +false +DEBUG;TRACE +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\App.xaml +1219584333 + +51579654133 +13-1310406943 +MainWindow.xaml; + +False + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.cache b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.cache new file mode 100644 index 0000000..8563252 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.cache @@ -0,0 +1,20 @@ +WpfStatisztika + + +winexe +C# +.cs +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\obj\Debug\ +WpfStatisztika +none +false +DEBUG;TRACE +C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\App.xaml +1219584333 + +6-502434485 +13-1310406943 +MainWindow.xaml; + +True + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.lref b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.lref new file mode 100644 index 0000000..5dfa247 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.i.lref @@ -0,0 +1,4 @@ + + +FC:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\MainWindow.xaml;; + diff --git a/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.lref b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.lref new file mode 100644 index 0000000..5dfa247 --- /dev/null +++ b/20250122/WpfStatisztika/WpfStatisztika/obj/Debug/WpfStatisztika_MarkupCompile.lref @@ -0,0 +1,4 @@ + + +FC:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\WpfStatisztika\WpfStatisztika\MainWindow.xaml;; + diff --git a/adatstrukturak b/adatstrukturak index 0ce97b6..fe26ce7 100644 --- a/adatstrukturak +++ b/adatstrukturak @@ -381,6 +381,7 @@ Beszúrásos rendezés hogy a sorozat rendezett maradjon. Az algoritmus futási ideje legjobb esetben konstans, legrosszabb esetben négyzetes. +<<<<<<< HEAD Pszeudokód: Ciklus i = 6 -tól 1-ig j = i - 1 @@ -389,4 +390,42 @@ Beszúrásos rendezés a[j+1] = a[j] j = j - 1 a[j+1] = tmp +======= + +Gyors rendezés + A gyorsrendezés az "oszd meg és uralkodj" elven működik. + Lépései a következők: + 1. Kiválasztunk a tömbből egy tetszőleges elemet. + Ez lesz az ún. vezérelem (pivot). + 2. Az ennél kisebbeket a tömb elejére, az ennél nagyobbakat a tömb végére rendezzük. + A vezérelemmel megegyező .... + + Az algoritmus Hatékonysága azon múlik, hogy sikerül-e jó vezérelemet választani. + Az algoritmus O(n log n) időben tud teljesíteni, de legrosszabb esetben O(n2) időben fut le. + + QUICKSORT (kez=0, vég=6) + + i = kez + j = veg + pivot = a[(i+j)/2] + Amíg i <= j + Amíg a[i] < pivot + i növelése + Amíg a[j] > pivot + j csökkentése + Ha i <= j Akkor + csere a[i] a[j] + i növelése + j csökkentése + Ha kez < j Akkor + QUICKSORT() + +Rekurzió + +Fibonacci sorozat + a n = (a n-1) + (a n-2) + + Iteratív számítás + +>>>>>>> bfcd5595b11fa9045544c47c0df7466e7ef1ebc5