Added footgolf homework
parent
8c4c4ef442
commit
e64ad694cd
@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
namespace ConsoleApp1
|
||||
{
|
||||
public class Jatekos
|
||||
{
|
||||
public string nev;
|
||||
public string kategoria;
|
||||
public string egyesulet;
|
||||
public int[] pontok = { };
|
||||
|
||||
public Jatekos(string Nev, string Kategoria, string Egyesulet, int[] Pontok)
|
||||
{
|
||||
nev = Nev;
|
||||
kategoria = Kategoria;
|
||||
egyesulet = Egyesulet;
|
||||
pontok = Pontok;
|
||||
}
|
||||
|
||||
public static int Osszpontszam(int[] p)
|
||||
{
|
||||
|
||||
int nulldb = 0;
|
||||
foreach (var item in p)
|
||||
{
|
||||
if (item == 0)
|
||||
{
|
||||
nulldb++;
|
||||
}
|
||||
}
|
||||
Array.Sort(p);
|
||||
|
||||
foreach (var item in p)
|
||||
{
|
||||
Console.WriteLine(item);
|
||||
}
|
||||
|
||||
int x = p.Sum();
|
||||
int legkisebb = p.Min();
|
||||
int legkisebb2 = p[0];
|
||||
|
||||
if (nulldb == 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < p.Length; i++)
|
||||
{
|
||||
if (legkisebb2 > p[i] && p[i] >= legkisebb)
|
||||
{
|
||||
legkisebb2 = p[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (p.Min() == 0)
|
||||
{
|
||||
|
||||
}
|
||||
x -= p.Min();
|
||||
|
||||
return x;
|
||||
}
|
||||
}
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
FileStream fs = new FileStream("fob2016.txt", FileMode.Open, FileAccess.Read);
|
||||
StreamReader sr = new StreamReader(fs);
|
||||
|
||||
List<Jatekos> adatok = new List<Jatekos>();
|
||||
|
||||
string sor = sr.ReadLine();
|
||||
|
||||
|
||||
while (sor != null)
|
||||
{
|
||||
string[] soradat = sor.Split(';');
|
||||
int[] temppont = { };
|
||||
for (int i = 3; i < soradat.Length; i++)
|
||||
{
|
||||
int pont = int.Parse(soradat[i]);
|
||||
temppont = temppont.Append(pont).ToArray();
|
||||
}
|
||||
Jatekos jatekos = new Jatekos(soradat[0], soradat[1], soradat[2], temppont);
|
||||
adatok.Add(jatekos);
|
||||
sor = sr.ReadLine();
|
||||
}
|
||||
|
||||
double db = 0;
|
||||
double ndb = 0;
|
||||
|
||||
foreach (var item in adatok)
|
||||
{
|
||||
db++;
|
||||
if (item.kategoria == "Noi")
|
||||
{
|
||||
ndb++;
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine($"3. feladat: Versenyzők száma: {db}");
|
||||
Console.WriteLine($"4. feladat: A női versenyzők aránya: {Math.Round((ndb / db) * 100, 2)}%");
|
||||
Console.WriteLine($"6. feladat: ");
|
||||
|
||||
|
||||
|
||||
sr.Close();
|
||||
fs.Close();
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
@ -0,0 +1,77 @@
|
||||
Albert Laszlo;Felnott ferfi;HOLE HUNTERS;0;0;10;10;0;0;0;10
|
||||
Bacskai Bence;Felnott ferfi;HOLE HUNTERS;0;62;110;110;56;95;80;74
|
||||
Bado Szilard;Felnott ferfi;MTDSC;38;32;26;26;80;11;42;50
|
||||
Bak Balazs;Felnott ferfi;EMFGSE;10;0;0;0;0;0;0;0
|
||||
Bako Attila;Felnott ferfi;FTC FOOTGOLF;29;20;10;50;35;0;0;56
|
||||
Balan Zoltan;Felnott ferfi;FTC FOOTGOLF;10;10;10;46;38;0;0;11
|
||||
Balanne Szabo Zsuzsa;Noi;FTC FOOTGOLF;0;0;56;56;68;0;0;0
|
||||
Baranya Akos;Felnott ferfi;TSC HOLE FOR ONE;10;10;10;10;0;10;0;10
|
||||
Bartal Peter;Felnott ferfi;EMFGSE;10;0;0;0;0;0;0;0
|
||||
Biro Laszlo;Felnott ferfi;FTC FOOTGOLF;10;11;10;10;17;35;35;20
|
||||
Bogar Krisztian;Felnott ferfi;FTC FOOTGOLF;50;0;95;68;95;62;46;110
|
||||
Bolcsfoldi Agnes;Noi;MILAN FOOTGOLF;0;62;62;68;80;0;0;0
|
||||
Borbely Istvan;Felnott ferfi;EMFGSE;0;0;0;10;10;20;10;10
|
||||
Cziffra Zoltan;Felnott ferfi;HOLE HUNTERS;14;10;20;14;10;12;32;46
|
||||
Czirbus Tamas;Felnott ferfi;BFGT;42;29;68;0;10;56;95;80
|
||||
Dreilinger Nandor;Felnott ferfi;HOLE HUNTERS;17;0;10;10;10;0;0;10
|
||||
Dusan Vangel;Felnott ferfi;SPARTAK TRNAVA;0;0;0;0;42;0;0;0
|
||||
Erchegyi Csaba;Felnott ferfi;OUTSIDERS;10;12;10;10;62;42;56;14
|
||||
Erdelyi Nora;Noi;ROYAL FOOTGOLF CLUB;74;74;80;74;74;80;80;74
|
||||
Eros Gergely;Felnott ferfi;FTC FOOTGOLF;10;10;10;11;0;10;0;10
|
||||
Fazekas Gabor;Felnott ferfi;EMFGSE;0;0;10;0;0;0;0;0
|
||||
Fenyvesi Andras;Felnott ferfi;n.a.;0;0;10;0;0;0;0;0
|
||||
Flink Janos;Felnott ferfi;OUTSIDERS;26;0;10;10;20;17;50;35
|
||||
Gelencser Gabor;Felnott ferfi;EMFGSE;74;50;10;95;10;29;74;42
|
||||
Gyenes Andras;Felnott ferfi;MILAN FOOTGOLF;10;0;10;0;0;0;0;0
|
||||
Hinora Ferenc;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;10;10;38;29;0;29;26
|
||||
Hrutka Janos;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;74;29;0;0;0;0;0
|
||||
Juhasz Zoltan;Felnott ferfi;HAPPY COMPANY;0;0;0;0;0;0;11;0
|
||||
Juraj Gubani;Felnott ferfi;FG SENEC;0;0;0;0;10;0;0;0
|
||||
Kalics Jozsef;Felnott ferfi;NIMROD FOOTGOLF EGYESULET;32;0;0;10;0;0;23;0
|
||||
Kallo Istvan;Felnott ferfi;FTC FOOTGOLF;10;0;62;0;26;0;0;0
|
||||
Kiss Roland;Felnott ferfi;SZTK FOOTGOLF;10;0;0;0;0;0;0;0
|
||||
Koszegi Jozsef;Felnott ferfi;FOCICLUB.HU;0;0;0;0;10;0;0;0
|
||||
Kovacs Andras;Felnott ferfi;EMFGSE;0;42;10;0;0;0;0;0
|
||||
Kristof Gabor;Felnott ferfi;FTC FOOTGOLF;0;10;10;10;0;0;0;0
|
||||
Lengyel Bela;Felnott ferfi;FTC FOOTGOLF;68;110;14;80;32;74;62;29
|
||||
Lenkei Robert;Felnott ferfi;n.a.;0;0;0;10;0;0;0;0
|
||||
Lovasz Krisztian;Felnott ferfi;n.a.;0;0;0;10;0;0;0;0
|
||||
Ludovit Andrassy;Felnott ferfi;FG SENEC;0;0;0;0;10;0;0;0
|
||||
Major Ilona;Noi;FTC FOOTGOLF;110;110;110;110;110;110;110;95
|
||||
Marek Cechovic;Felnott ferfi;FG SENEC;0;0;17;0;0;0;0;0
|
||||
Marek Smihel;Felnott ferfi;FG SENEC;0;0;46;0;0;0;0;0
|
||||
Modroczky Gyorgy;Felnott ferfi;MILAN FOOTGOLF;10;0;10;10;0;0;0;0
|
||||
Molnar Arnold;Felnott ferfi;MILAN FOOTGOLF;10;23;0;10;0;0;26;10
|
||||
Molnar Attila;Felnott ferfi;EMFGSE;10;14;10;10;14;23;10;10
|
||||
Nagy Balazs;Felnott ferfi;HOLE HUNTERS;10;17;11;12;10;50;20;32
|
||||
Nagy Gabor Milan;Felnott ferfi;MILAN FOOTGOLF;10;0;0;10;0;0;0;0
|
||||
Nagy Niki;Noi;FTC FOOTGOLF;95;80;95;95;62;0;0;110
|
||||
Nemeth Ferenc;Felnott ferfi;MTDSC;0;0;0;10;10;0;0;0
|
||||
Nemeth Gabor;Felnott ferfi;FTC FOOTGOLF;80;95;38;74;74;46;38;68
|
||||
Nemeth Peter;Felnott ferfi;FTC FOOTGOLF;10;0;23;32;0;0;0;0
|
||||
Oszi Adam;Felnott ferfi;FOCICLUB.HU;0;0;0;0;10;0;0;0
|
||||
Pap Ferenc;Felnott ferfi;HOLE HUNTERS;35;10;50;20;10;32;17;62
|
||||
Papp Peter;Felnott ferfi;BFGT;56;80;56;0;46;68;110;95
|
||||
Parragh Viktoria;Noi;HOLE FOR ONE;0;68;0;0;0;0;0;0
|
||||
Poda Tamas;Felnott ferfi;TSC HOLE FOR ONE;10;10;10;0;0;0;0;0
|
||||
Podusil Gyorgy;Felnott ferfi;BFGT;11;10;80;0;68;80;68;17
|
||||
Puklus Gabor;Felnott ferfi;NIMROD FOOTGOLF EGYESULET;10;0;0;0;0;0;0;0
|
||||
Pusztai Panni;Noi;HOLE HUNTERS;80;95;74;80;95;95;95;80
|
||||
Renata Smihelova;Noi;n.a.;0;0;68;0;0;0;0;0
|
||||
Richard Nerer;Felnott ferfi;n.a.;0;0;10;0;0;0;0;0
|
||||
Sain Antal;Felnott ferfi;FTC FOOTGOLF;10;38;10;42;10;0;0;0
|
||||
Sebestyen Laszlo;Felnott ferfi;EMFGSE;10;10;10;10;10;14;0;10
|
||||
Simonyi Gabor;Felnott ferfi;OUTSIDERS;110;0;35;56;0;0;0;38
|
||||
Szabo Laszlo;Felnott ferfi;BFGT;0;0;0;23;11;0;14;0
|
||||
Szantay Gina;Noi;FTC FOOTGOLF;0;0;0;62;0;0;0;68
|
||||
Tajtyi Robert;Felnott ferfi;BFGT;62;68;74;0;50;0;0;0
|
||||
Takacs Attila;Felnott ferfi;EMFGSE;95;35;10;62;23;38;0;10
|
||||
Tamas Csaba;Felnott ferfi;FOOTGOLF HUNGARY KFT;10;0;10;0;0;10;0;0
|
||||
Tomas Bartko;Felnott ferfi;FG SENEC;0;0;32;0;110;110;0;0
|
||||
Tomas Dittinger;Felnott ferfi;FG PETRZALKA;10;0;0;0;0;0;0;0
|
||||
Tomas Hollosy;Felnott ferfi;FG SENEC;0;0;42;0;0;0;0;0
|
||||
Tomas Kikus;Felnott ferfi;FG BRATISLAVA;23;0;0;0;0;0;0;0
|
||||
Torok Tamas;Felnott ferfi;EMFGSE;10;26;10;29;0;0;0;0
|
||||
Ujszaszi Balazs;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;0;10;17;10;10;10;10
|
||||
Varga Gabor;Felnott ferfi;ROYAL FOOTGOLF CLUB;20;46;0;0;0;0;0;0
|
||||
Zsok Richard;Felnott ferfi;ROYAL FOOTGOLF CLUB;46;56;10;35;10;26;0;23
|
@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
25f359d3fd7d560a1dec87ab383b84f91627954af157e6d29c6e8f4a1e97b265
|
@ -0,0 +1,7 @@
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\bin\Debug\ConsoleApp1.exe.config
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\bin\Debug\ConsoleApp1.exe
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\bin\Debug\ConsoleApp1.pdb
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.AssemblyReference.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\obj\Debug\ConsoleApp1.csproj.CoreCompileInputs.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\obj\Debug\ConsoleApp1.exe
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240123\ConsoleApp1\obj\Debug\ConsoleApp1.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,68 @@
|
||||
Albert Laszlo;30
|
||||
Bacskai Bence;541
|
||||
Bado Szilard;288
|
||||
Bak Balazs;10
|
||||
Bako Attila;200
|
||||
Balan Zoltan;125
|
||||
Baranya Akos;60
|
||||
Bartal Peter;10
|
||||
Biro Laszlo;148
|
||||
Bogar Krisztian;490
|
||||
Borbely Istvan;60
|
||||
Cziffra Zoltan;158
|
||||
Czirbus Tamas;380
|
||||
Dreilinger Nandor;57
|
||||
Dusan Vangel;42
|
||||
Erchegyi Csaba;216
|
||||
Eros Gergely;61
|
||||
Fazekas Gabor;10
|
||||
Fenyvesi Andras;10
|
||||
Flink Janos;168
|
||||
Gelencser Gabor;384
|
||||
Gyenes Andras;20
|
||||
Hinora Ferenc;152
|
||||
Hrutka Janos;113
|
||||
Juhasz Zoltan;11
|
||||
Juraj Gubani;10
|
||||
Kalics Jozsef;65
|
||||
Kallo Istvan;98
|
||||
Kiss Roland;10
|
||||
Koszegi Jozsef;10
|
||||
Kovacs Andras;52
|
||||
Kristof Gabor;30
|
||||
Lengyel Bela;446
|
||||
Lenkei Robert;10
|
||||
Lovasz Krisztian;10
|
||||
Ludovit Andrassy;10
|
||||
Marek Cechovic;17
|
||||
Marek Smihel;46
|
||||
Modroczky Gyorgy;30
|
||||
Molnar Arnold;79
|
||||
Molnar Attila;101
|
||||
Nagy Balazs;162
|
||||
Nagy Gabor Milan;20
|
||||
Nemeth Ferenc;20
|
||||
Nemeth Gabor;457
|
||||
Nemeth Peter;65
|
||||
Oszi Adam;10
|
||||
Pap Ferenc;236
|
||||
Papp Peter;475
|
||||
Poda Tamas;30
|
||||
Podusil Gyorgy;334
|
||||
Puklus Gabor;10
|
||||
Richard Nerer;10
|
||||
Sain Antal;110
|
||||
Sebestyen Laszlo;74
|
||||
Simonyi Gabor;239
|
||||
Szabo Laszlo;48
|
||||
Tajtyi Robert;254
|
||||
Takacs Attila;273
|
||||
Tamas Csaba;30
|
||||
Tomas Bartko;252
|
||||
Tomas Dittinger;10
|
||||
Tomas Hollosy;42
|
||||
Tomas Kikus;23
|
||||
Torok Tamas;75
|
||||
Ujszaszi Balazs;77
|
||||
Varga Gabor;66
|
||||
Zsok Richard;206
|
Binary file not shown.
@ -0,0 +1,77 @@
|
||||
Albert Laszlo;Felnott ferfi;HOLE HUNTERS;0;0;10;10;0;0;0;10
|
||||
Bacskai Bence;Felnott ferfi;HOLE HUNTERS;0;62;110;110;56;95;80;74
|
||||
Bado Szilard;Felnott ferfi;MTDSC;38;32;26;26;80;11;42;50
|
||||
Bak Balazs;Felnott ferfi;EMFGSE;10;0;0;0;0;0;0;0
|
||||
Bako Attila;Felnott ferfi;FTC FOOTGOLF;29;20;10;50;35;0;0;56
|
||||
Balan Zoltan;Felnott ferfi;FTC FOOTGOLF;10;10;10;46;38;0;0;11
|
||||
Balanne Szabo Zsuzsa;Noi;FTC FOOTGOLF;0;0;56;56;68;0;0;0
|
||||
Baranya Akos;Felnott ferfi;TSC HOLE FOR ONE;10;10;10;10;0;10;0;10
|
||||
Bartal Peter;Felnott ferfi;EMFGSE;10;0;0;0;0;0;0;0
|
||||
Biro Laszlo;Felnott ferfi;FTC FOOTGOLF;10;11;10;10;17;35;35;20
|
||||
Bogar Krisztian;Felnott ferfi;FTC FOOTGOLF;50;0;95;68;95;62;46;110
|
||||
Bolcsfoldi Agnes;Noi;MILAN FOOTGOLF;0;62;62;68;80;0;0;0
|
||||
Borbely Istvan;Felnott ferfi;EMFGSE;0;0;0;10;10;20;10;10
|
||||
Cziffra Zoltan;Felnott ferfi;HOLE HUNTERS;14;10;20;14;10;12;32;46
|
||||
Czirbus Tamas;Felnott ferfi;BFGT;42;29;68;0;10;56;95;80
|
||||
Dreilinger Nandor;Felnott ferfi;HOLE HUNTERS;17;0;10;10;10;0;0;10
|
||||
Dusan Vangel;Felnott ferfi;SPARTAK TRNAVA;0;0;0;0;42;0;0;0
|
||||
Erchegyi Csaba;Felnott ferfi;OUTSIDERS;10;12;10;10;62;42;56;14
|
||||
Erdelyi Nora;Noi;ROYAL FOOTGOLF CLUB;74;74;80;74;74;80;80;74
|
||||
Eros Gergely;Felnott ferfi;FTC FOOTGOLF;10;10;10;11;0;10;0;10
|
||||
Fazekas Gabor;Felnott ferfi;EMFGSE;0;0;10;0;0;0;0;0
|
||||
Fenyvesi Andras;Felnott ferfi;n.a.;0;0;10;0;0;0;0;0
|
||||
Flink Janos;Felnott ferfi;OUTSIDERS;26;0;10;10;20;17;50;35
|
||||
Gelencser Gabor;Felnott ferfi;EMFGSE;74;50;10;95;10;29;74;42
|
||||
Gyenes Andras;Felnott ferfi;MILAN FOOTGOLF;10;0;10;0;0;0;0;0
|
||||
Hinora Ferenc;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;10;10;38;29;0;29;26
|
||||
Hrutka Janos;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;74;29;0;0;0;0;0
|
||||
Juhasz Zoltan;Felnott ferfi;HAPPY COMPANY;0;0;0;0;0;0;11;0
|
||||
Juraj Gubani;Felnott ferfi;FG SENEC;0;0;0;0;10;0;0;0
|
||||
Kalics Jozsef;Felnott ferfi;NIMROD FOOTGOLF EGYESULET;32;0;0;10;0;0;23;0
|
||||
Kallo Istvan;Felnott ferfi;FTC FOOTGOLF;10;0;62;0;26;0;0;0
|
||||
Kiss Roland;Felnott ferfi;SZTK FOOTGOLF;10;0;0;0;0;0;0;0
|
||||
Koszegi Jozsef;Felnott ferfi;FOCICLUB.HU;0;0;0;0;10;0;0;0
|
||||
Kovacs Andras;Felnott ferfi;EMFGSE;0;42;10;0;0;0;0;0
|
||||
Kristof Gabor;Felnott ferfi;FTC FOOTGOLF;0;10;10;10;0;0;0;0
|
||||
Lengyel Bela;Felnott ferfi;FTC FOOTGOLF;68;110;14;80;32;74;62;29
|
||||
Lenkei Robert;Felnott ferfi;n.a.;0;0;0;10;0;0;0;0
|
||||
Lovasz Krisztian;Felnott ferfi;n.a.;0;0;0;10;0;0;0;0
|
||||
Ludovit Andrassy;Felnott ferfi;FG SENEC;0;0;0;0;10;0;0;0
|
||||
Major Ilona;Noi;FTC FOOTGOLF;110;110;110;110;110;110;110;95
|
||||
Marek Cechovic;Felnott ferfi;FG SENEC;0;0;17;0;0;0;0;0
|
||||
Marek Smihel;Felnott ferfi;FG SENEC;0;0;46;0;0;0;0;0
|
||||
Modroczky Gyorgy;Felnott ferfi;MILAN FOOTGOLF;10;0;10;10;0;0;0;0
|
||||
Molnar Arnold;Felnott ferfi;MILAN FOOTGOLF;10;23;0;10;0;0;26;10
|
||||
Molnar Attila;Felnott ferfi;EMFGSE;10;14;10;10;14;23;10;10
|
||||
Nagy Balazs;Felnott ferfi;HOLE HUNTERS;10;17;11;12;10;50;20;32
|
||||
Nagy Gabor Milan;Felnott ferfi;MILAN FOOTGOLF;10;0;0;10;0;0;0;0
|
||||
Nagy Niki;Noi;FTC FOOTGOLF;95;80;95;95;62;0;0;110
|
||||
Nemeth Ferenc;Felnott ferfi;MTDSC;0;0;0;10;10;0;0;0
|
||||
Nemeth Gabor;Felnott ferfi;FTC FOOTGOLF;80;95;38;74;74;46;38;68
|
||||
Nemeth Peter;Felnott ferfi;FTC FOOTGOLF;10;0;23;32;0;0;0;0
|
||||
Oszi Adam;Felnott ferfi;FOCICLUB.HU;0;0;0;0;10;0;0;0
|
||||
Pap Ferenc;Felnott ferfi;HOLE HUNTERS;35;10;50;20;10;32;17;62
|
||||
Papp Peter;Felnott ferfi;BFGT;56;80;56;0;46;68;110;95
|
||||
Parragh Viktoria;Noi;HOLE FOR ONE;0;68;0;0;0;0;0;0
|
||||
Poda Tamas;Felnott ferfi;TSC HOLE FOR ONE;10;10;10;0;0;0;0;0
|
||||
Podusil Gyorgy;Felnott ferfi;BFGT;11;10;80;0;68;80;68;17
|
||||
Puklus Gabor;Felnott ferfi;NIMROD FOOTGOLF EGYESULET;10;0;0;0;0;0;0;0
|
||||
Pusztai Panni;Noi;HOLE HUNTERS;80;95;74;80;95;95;95;80
|
||||
Renata Smihelova;Noi;n.a.;0;0;68;0;0;0;0;0
|
||||
Richard Nerer;Felnott ferfi;n.a.;0;0;10;0;0;0;0;0
|
||||
Sain Antal;Felnott ferfi;FTC FOOTGOLF;10;38;10;42;10;0;0;0
|
||||
Sebestyen Laszlo;Felnott ferfi;EMFGSE;10;10;10;10;10;14;0;10
|
||||
Simonyi Gabor;Felnott ferfi;OUTSIDERS;110;0;35;56;0;0;0;38
|
||||
Szabo Laszlo;Felnott ferfi;BFGT;0;0;0;23;11;0;14;0
|
||||
Szantay Gina;Noi;FTC FOOTGOLF;0;0;0;62;0;0;0;68
|
||||
Tajtyi Robert;Felnott ferfi;BFGT;62;68;74;0;50;0;0;0
|
||||
Takacs Attila;Felnott ferfi;EMFGSE;95;35;10;62;23;38;0;10
|
||||
Tamas Csaba;Felnott ferfi;FOOTGOLF HUNGARY KFT;10;0;10;0;0;10;0;0
|
||||
Tomas Bartko;Felnott ferfi;FG SENEC;0;0;32;0;110;110;0;0
|
||||
Tomas Dittinger;Felnott ferfi;FG PETRZALKA;10;0;0;0;0;0;0;0
|
||||
Tomas Hollosy;Felnott ferfi;FG SENEC;0;0;42;0;0;0;0;0
|
||||
Tomas Kikus;Felnott ferfi;FG BRATISLAVA;23;0;0;0;0;0;0;0
|
||||
Torok Tamas;Felnott ferfi;EMFGSE;10;26;10;29;0;0;0;0
|
||||
Ujszaszi Balazs;Felnott ferfi;ROYAL FOOTGOLF CLUB;10;0;10;17;10;10;10;10
|
||||
Varga Gabor;Felnott ferfi;ROYAL FOOTGOLF CLUB;20;46;0;0;0;0;0;0
|
||||
Zsok Richard;Felnott ferfi;ROYAL FOOTGOLF CLUB;46;56;10;35;10;26;0;23
|
@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace footgolf
|
||||
{
|
||||
class fobDatabase
|
||||
{
|
||||
public string versenyzoNeve { get; set;}
|
||||
public string versenyzoKategoriaja { get; set; }
|
||||
public string versenyzoEgyesuletNeve { get; set; }
|
||||
public int[] versenyzoPontjai = { };
|
||||
|
||||
public fobDatabase(string line)
|
||||
{
|
||||
string[] splittedLine = line.Split(';');
|
||||
this.versenyzoNeve = splittedLine[0];
|
||||
this.versenyzoKategoriaja = splittedLine[1];
|
||||
this.versenyzoEgyesuletNeve = splittedLine[2];
|
||||
for (int i = 3; i < splittedLine.Length; i++)
|
||||
{
|
||||
versenyzoPontjai = versenyzoPontjai.Append(int.Parse(splittedLine[i])).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public int [] valogatottLista = { };
|
||||
public int pontSumma = 0;
|
||||
|
||||
public void pontSzamitas(int [] lista)
|
||||
{
|
||||
Array.Sort(lista);
|
||||
for (int i = 0; i < lista.Length; i++)
|
||||
{
|
||||
if (lista[0] != 0)
|
||||
{
|
||||
Console.WriteLine(pontSumma);
|
||||
pontSumma += 10;
|
||||
Console.WriteLine(pontSumma);
|
||||
}
|
||||
else if(lista[1] != 0)
|
||||
{
|
||||
Console.WriteLine(pontSumma);
|
||||
pontSumma += 10;
|
||||
Console.WriteLine(pontSumma);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 2; i < lista.Length; i++)
|
||||
{
|
||||
valogatottLista = valogatottLista.Append(lista[i]).ToArray();
|
||||
}
|
||||
|
||||
for (int i = 0; i < valogatottLista.Length; i++)
|
||||
{
|
||||
pontSumma += valogatottLista[i];
|
||||
}
|
||||
/*for (int i = 0; i < valogatottLista.Length; i++)
|
||||
{
|
||||
Console.Write($"{valogatottLista[i]}, ");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
|
||||
namespace footgolf
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//2. feladat
|
||||
|
||||
string[] sorok = File.ReadAllLines("C:\\Users\\medvegergo\\Desktop\\fob2016.txt");
|
||||
List<fobDatabase> db = new List<fobDatabase>();
|
||||
|
||||
for (int i = 0; i < sorok.Length; i++)
|
||||
{
|
||||
fobDatabase bemenet = new fobDatabase(sorok[i]);
|
||||
db.Add(bemenet);
|
||||
}
|
||||
|
||||
//3. feladat
|
||||
Console.WriteLine($"3. feladat: Versenyzők száma: {db.Count}");
|
||||
|
||||
//4. feladat
|
||||
double nokSzama = 0;
|
||||
for (int i = 0; i < db.Count; i++)
|
||||
{
|
||||
if (db[i].versenyzoKategoriaja == "Noi")
|
||||
{
|
||||
nokSzama++;
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"4. feladat: A női versenyzők aránya: {Math.Round((nokSzama / db.Count) * 100, 2)}");
|
||||
|
||||
//5. feladat
|
||||
for (int i = 0; i < db.Count; i++)
|
||||
{
|
||||
int[] bemenetiLista = db[i].versenyzoPontjai;
|
||||
db[i].pontSzamitas(bemenetiLista);
|
||||
}
|
||||
|
||||
//6. feladat
|
||||
Console.WriteLine("6. feladat: A bajnok női versenyző");
|
||||
int index = 0;
|
||||
int legnagyobbPont = 0;
|
||||
for (int i = 0; i < db.Count; i++)
|
||||
{
|
||||
if (db[i].pontSumma > legnagyobbPont)
|
||||
{
|
||||
legnagyobbPont = db[i].pontSumma;
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"Név: {db[index].versenyzoNeve}");
|
||||
Console.WriteLine($"Egyesület: {db[index].versenyzoEgyesuletNeve}");
|
||||
Console.WriteLine($"Összpont: {db[index].pontSumma}");
|
||||
|
||||
|
||||
//7. feladat
|
||||
|
||||
string[] irandoSorok = { };
|
||||
for (int i = 0; i < db.Count; i++)
|
||||
{
|
||||
if(db[i].versenyzoKategoriaja == "Felnott ferfi")
|
||||
{
|
||||
string irandoSor = $"{db[i].versenyzoNeve};{db[i].pontSumma}";
|
||||
irandoSorok = irandoSorok.Append(irandoSor).ToArray();
|
||||
}
|
||||
}
|
||||
File.WriteAllLines("C:\\Users\\medvegergo\\Desktop\\osszpontFF.txt", irandoSorok);
|
||||
Console.WriteLine();
|
||||
|
||||
/*for (int i = 0; i < db.Count; i++)
|
||||
{
|
||||
Console.WriteLine(db[i].versenyzoNeve);
|
||||
}*/
|
||||
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue