diff --git a/KiMitTud.sln b/KiMitTud.sln new file mode 100644 index 0000000..81b761b --- /dev/null +++ b/KiMitTud.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35818.85 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KiMitTud", "KiMitTud\KiMitTud.csproj", "{F5F43659-F262-4689-B6F6-DBB7825F849C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersenyzoGUI", "VersenyzoGUI\VersenyzoGUI.csproj", "{11850A57-8D45-4B2E-A513-85856158C152}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F5F43659-F262-4689-B6F6-DBB7825F849C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5F43659-F262-4689-B6F6-DBB7825F849C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5F43659-F262-4689-B6F6-DBB7825F849C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5F43659-F262-4689-B6F6-DBB7825F849C}.Release|Any CPU.Build.0 = Release|Any CPU + {11850A57-8D45-4B2E-A513-85856158C152}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11850A57-8D45-4B2E-A513-85856158C152}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11850A57-8D45-4B2E-A513-85856158C152}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11850A57-8D45-4B2E-A513-85856158C152}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {154E0F93-2F1F-4CB3-A490-319EADD5F5F0} + EndGlobalSection +EndGlobal diff --git a/KiMitTud/App.config b/KiMitTud/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/KiMitTud/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/KiMitTud/KiMitTud.csproj b/KiMitTud/KiMitTud.csproj new file mode 100644 index 0000000..8d5b20e --- /dev/null +++ b/KiMitTud/KiMitTud.csproj @@ -0,0 +1,57 @@ + + + + + Debug + AnyCPU + {F5F43659-F262-4689-B6F6-DBB7825F849C} + Exe + KiMitTud + KiMitTud + 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/KiMitTud/Program.cs b/KiMitTud/Program.cs new file mode 100644 index 0000000..80b66f3 --- /dev/null +++ b/KiMitTud/Program.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; + +namespace KiMitTud +{ + class Program + { + static void Main(string[] args) + { + + List Versenyzolista = new List(); + + + string[] nyers = File.ReadAllLines(@"..\..\selejtezo.txt"); + foreach (var item in nyers) + { + Versenyzolista.Add(new Versenyzo(item)); + } + + Console.WriteLine($"3. feladat : a versenyen {Versenyzolista.Count} VersenyzÅ‘ vett részt"); + + + + Console.WriteLine("4. Feladat Kérem a Kritikus számát"); + int valasztottkritikus = int.Parse(Console.ReadLine()); + + double Osszeadva = 0; + + foreach (var item in Versenyzolista) + { + Osszeadva += item.pontoklista[valasztottkritikus - 1] ; + + } + + Console.WriteLine($"5. Feladat: A választott kritikus pontszámainak átlaga: {(Osszeadva/6):N1}"); + + string Legnagyobbpontszamos = Versenyzolista[0].nev; + int legnagyobbpontszam = Versenyzolista[0].elertpontok; + foreach (var item in Versenyzolista) + { + if (item.elertpontok > legnagyobbpontszam) + { + legnagyobbpontszam = item.elertpontok; + Legnagyobbpontszamos = item.nev; + } + } + + Console.WriteLine($"6. Feladat : A legnagyobb pontszámmal rendelkezÅ‘ személy : {Legnagyobbpontszamos} {legnagyobbpontszam} ponttal."); + + + } + } +} diff --git a/KiMitTud/Properties/AssemblyInfo.cs b/KiMitTud/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a1fdf08 --- /dev/null +++ b/KiMitTud/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("KiMitTud")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("KiMitTud")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f5f43659-f262-4689-b6f6-dbb7825f849c")] + +// 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/KiMitTud/Versenyzo.cs b/KiMitTud/Versenyzo.cs new file mode 100644 index 0000000..70ab1cb --- /dev/null +++ b/KiMitTud/Versenyzo.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KiMitTud +{ + class Versenyzo + { + public string nev; + public string pontstring; + public int elertpontok; + public List pontoklista; + + + public Versenyzo(string adatsor) + { + nev = adatsor.Split(';')[0]; + pontstring = adatsor.Split(';')[1]; + + pontoklista = new List() ; + + foreach (var pont in pontstring.Split(' ')) + { + pontoklista.Add(int.Parse(pont)); + } + + elertpontok = pontoklista.Sum() - pontoklista.Max() - pontoklista.Min(); + + } + + } +} diff --git a/KiMitTud/selejtezo.txt b/KiMitTud/selejtezo.txt new file mode 100644 index 0000000..4730d19 --- /dev/null +++ b/KiMitTud/selejtezo.txt @@ -0,0 +1,9 @@ +Kovács Adél;6 10 9 8 7 6 +Horváth Lili;3 5 4 3 6 5 +Lukács Andrea;2 4 7 5 4 5 +Nagy Tibor;1 3 2 3 3 2 +Varga Bence;6 3 5 6 6 7 +Major Anna;9 6 10 6 9 10 +Kiss Mária;1 2 1 2 1 2 +Szabó Rita;6 6 6 7 6 6 +Lakatos Gabriella;4 7 5 6 7 6 diff --git a/VersenyzoGUI/App.config b/VersenyzoGUI/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/VersenyzoGUI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/VersenyzoGUI/Form1.Designer.cs b/VersenyzoGUI/Form1.Designer.cs new file mode 100644 index 0000000..a197d29 --- /dev/null +++ b/VersenyzoGUI/Form1.Designer.cs @@ -0,0 +1,153 @@ +namespace VersenyzoGUI +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(76, 50); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(44, 16); + this.label1.TabIndex = 0; + this.label1.Text = "label1"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(76, 97); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 16); + this.label2.TabIndex = 1; + this.label2.Text = "label2"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(76, 149); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(44, 16); + this.label3.TabIndex = 2; + this.label3.Text = "label3"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(112, 233); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(44, 16); + this.label4.TabIndex = 3; + this.label4.Text = "label4"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(112, 281); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(44, 16); + this.label5.TabIndex = 4; + this.label5.Text = "label5"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(161, 107); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(433, 22); + this.textBox1.TabIndex = 5; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(161, 149); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(433, 22); + this.textBox2.TabIndex = 6; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(642, 155); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(44, 16); + this.label6.TabIndex = 7; + this.label6.Text = "label6"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(475, 303); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 8; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.button1); + this.Controls.Add(this.label6); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Button button1; + } +} + diff --git a/VersenyzoGUI/Form1.cs b/VersenyzoGUI/Form1.cs new file mode 100644 index 0000000..7dfb37a --- /dev/null +++ b/VersenyzoGUI/Form1.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VersenyzoGUI +{ + public partial class Form1: Form + { + public Form1() + { + InitializeComponent(); + } + } +} diff --git a/VersenyzoGUI/Form1.resx b/VersenyzoGUI/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/VersenyzoGUI/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VersenyzoGUI/Program.cs b/VersenyzoGUI/Program.cs new file mode 100644 index 0000000..b835767 --- /dev/null +++ b/VersenyzoGUI/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VersenyzoGUI +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/VersenyzoGUI/Properties/AssemblyInfo.cs b/VersenyzoGUI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6176df2 --- /dev/null +++ b/VersenyzoGUI/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("VersenyzoGUI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("VersenyzoGUI")] +[assembly: AssemblyCopyright("Copyright © 2026")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("11850a57-8d45-4b2e-a513-85856158c152")] + +// 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/VersenyzoGUI/Properties/Resources.Designer.cs b/VersenyzoGUI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1ab7628 --- /dev/null +++ b/VersenyzoGUI/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 VersenyzoGUI.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("VersenyzoGUI.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/VersenyzoGUI/Properties/Resources.resx b/VersenyzoGUI/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/VersenyzoGUI/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/VersenyzoGUI/Properties/Settings.Designer.cs b/VersenyzoGUI/Properties/Settings.Designer.cs new file mode 100644 index 0000000..0bdc1ed --- /dev/null +++ b/VersenyzoGUI/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 VersenyzoGUI.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/VersenyzoGUI/Properties/Settings.settings b/VersenyzoGUI/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/VersenyzoGUI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/VersenyzoGUI/VersenyzoGUI.csproj b/VersenyzoGUI/VersenyzoGUI.csproj new file mode 100644 index 0000000..c29cce9 --- /dev/null +++ b/VersenyzoGUI/VersenyzoGUI.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {11850A57-8D45-4B2E-A513-85856158C152} + WinExe + VersenyzoGUI + VersenyzoGUI + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file