Add project files.
This commit is contained in:
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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user