Add project files.
This commit is contained in:
6
KiMitTud/App.config
Normal file
6
KiMitTud/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
||||
57
KiMitTud/KiMitTud.csproj
Normal file
57
KiMitTud/KiMitTud.csproj
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F5F43659-F262-4689-B6F6-DBB7825F849C}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>KiMitTud</RootNamespace>
|
||||
<AssemblyName>KiMitTud</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Versenyzo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="selejtezo.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
57
KiMitTud/Program.cs
Normal file
57
KiMitTud/Program.cs
Normal file
@@ -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<Versenyzo> Versenyzolista = new List<Versenyzo>();
|
||||
|
||||
|
||||
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.");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
33
KiMitTud/Properties/AssemblyInfo.cs
Normal file
33
KiMitTud/Properties/AssemblyInfo.cs
Normal file
@@ -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")]
|
||||
34
KiMitTud/Versenyzo.cs
Normal file
34
KiMitTud/Versenyzo.cs
Normal file
@@ -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<int> pontoklista;
|
||||
|
||||
|
||||
public Versenyzo(string adatsor)
|
||||
{
|
||||
nev = adatsor.Split(';')[0];
|
||||
pontstring = adatsor.Split(';')[1];
|
||||
|
||||
pontoklista = new List<int>() ;
|
||||
|
||||
foreach (var pont in pontstring.Split(' '))
|
||||
{
|
||||
pontoklista.Add(int.Parse(pont));
|
||||
}
|
||||
|
||||
elertpontok = pontoklista.Sum() - pontoklista.Max() - pontoklista.Min();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
9
KiMitTud/selejtezo.txt
Normal file
9
KiMitTud/selejtezo.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Kov<EFBFBD>cs Ad<41>l;6 10 9 8 7 6
|
||||
Horv<EFBFBD>th Lili;3 5 4 3 6 5
|
||||
Luk<EFBFBD>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<EFBFBD> Rita;6 6 6 7 6 6
|
||||
Lakatos Gabriella;4 7 5 6 7 6
|
||||
Reference in New Issue
Block a user