Add project files.
This commit is contained in:
6
Helsinki1952/App.config
Normal file
6
Helsinki1952/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
Helsinki1952/Helsinki1952.csproj
Normal file
57
Helsinki1952/Helsinki1952.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>{042640DD-BE35-4669-8485-E06367232EA8}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Helsinki1952</RootNamespace>
|
||||
<AssemblyName>Helsinki1952</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="Olimpia.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="helsinki.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
25
Helsinki1952/Olimpia.cs
Normal file
25
Helsinki1952/Olimpia.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Helsinki1952
|
||||
{
|
||||
internal class Olimpia
|
||||
{
|
||||
public int helyezes;
|
||||
public int olimpikonok;
|
||||
public string sport;
|
||||
public string versenyszam;
|
||||
|
||||
public Olimpia(string adatsor)
|
||||
{
|
||||
string[] t = adatsor.Split(' ');
|
||||
helyezes = int.Parse(t[0]);
|
||||
olimpikonok = int.Parse(t[1]);
|
||||
sport = t[2];
|
||||
versenyszam = t[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Helsinki1952/Program.cs
Normal file
102
Helsinki1952/Program.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Helsinki1952
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
public static List<Olimpia> helsinkiList;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
Feladat2();
|
||||
Feladat3();
|
||||
Feladat4();
|
||||
Feladat5();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static void Feladat5()
|
||||
{
|
||||
int opont = 0;
|
||||
foreach (Olimpia hs in helsinkiList)
|
||||
{
|
||||
if (hs.helyezes == 1)
|
||||
{
|
||||
opont += 7;
|
||||
}
|
||||
else if (hs.helyezes == 2)
|
||||
{
|
||||
opont += 5;
|
||||
}
|
||||
else if (hs.helyezes == 3)
|
||||
{
|
||||
opont += 4;
|
||||
}
|
||||
else if (hs.helyezes == 4)
|
||||
{
|
||||
opont += 3;
|
||||
}
|
||||
else if (hs.helyezes == 5)
|
||||
{
|
||||
opont += 2;
|
||||
}
|
||||
else { opont += 1; }
|
||||
}
|
||||
Console.WriteLine("5. feladat:");
|
||||
Console.WriteLine($"Olimpiai pontok száma: {opont}");
|
||||
}
|
||||
|
||||
private static void Feladat4()
|
||||
{
|
||||
int arany = 0;
|
||||
int ezust = 0;
|
||||
int bronz = 0;
|
||||
|
||||
foreach (Olimpia hs in helsinkiList)
|
||||
{
|
||||
if (hs.helyezes == 1)
|
||||
{
|
||||
arany++;
|
||||
}
|
||||
else if (hs.helyezes == 2)
|
||||
{
|
||||
ezust++;
|
||||
}
|
||||
else if (hs.helyezes == 3)
|
||||
{
|
||||
bronz++;
|
||||
}
|
||||
else { break; }
|
||||
}
|
||||
int osszes = arany + ezust + bronz;
|
||||
Console.WriteLine("4. feladat:");
|
||||
Console.WriteLine($"Arany: {arany}");
|
||||
Console.WriteLine($"Ezust: {ezust}");
|
||||
Console.WriteLine($"Bronz: {bronz}");
|
||||
Console.WriteLine($"Összesen: {osszes}");
|
||||
}
|
||||
|
||||
private static void Feladat3()
|
||||
{
|
||||
Console.WriteLine("3. feladat:");
|
||||
Console.WriteLine($"Pontszerző helyezések száma: {helsinkiList.Count}");
|
||||
}
|
||||
|
||||
private static void Feladat2()
|
||||
{
|
||||
helsinkiList = new List<Olimpia>();
|
||||
StreamReader streamReader = new StreamReader(@"..\..\helsinki.txt");
|
||||
while (!streamReader.EndOfStream)
|
||||
{
|
||||
helsinkiList.Add(new Olimpia(streamReader.ReadLine()));
|
||||
}
|
||||
streamReader.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Helsinki1952/Properties/AssemblyInfo.cs
Normal file
33
Helsinki1952/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("Helsinki1952")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Helsinki1952")]
|
||||
[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("042640dd-be35-4669-8485-e06367232ea8")]
|
||||
|
||||
// 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")]
|
||||
64
Helsinki1952/helsinki.txt
Normal file
64
Helsinki1952/helsinki.txt
Normal file
@@ -0,0 +1,64 @@
|
||||
1 1 atletika kalapacsvetes
|
||||
1 1 uszas 400m_gyorsuszas
|
||||
1 1 birkozas kotott_fogas_legsuly
|
||||
1 1 torna talajtorna
|
||||
1 1 torna felemas_korlat
|
||||
1 1 vivas kardvivas_egyeni
|
||||
1 1 okolvivas nagyvaltosuly
|
||||
1 1 uszas 200m_melluszas
|
||||
1 1 birkozas kotott_fogas_valtosuly
|
||||
1 1 uszas 100m_gyorsuszas
|
||||
1 1 sportloveszet onmukodo_sportpisztoly
|
||||
1 15 labdarugas ferfi_csapat
|
||||
1 3 ottusa ferfi_csapat
|
||||
1 6 vivas kardvivas_csapat
|
||||
1 5 uszas 4x100m_gyorsuszo_valto
|
||||
1 13 vizilabda ferfi_csapat
|
||||
2 1 ottusa ottusa_egyeni
|
||||
2 1 vivas torvivas_egyeni
|
||||
2 1 vivas kardvivas_egyeni
|
||||
2 1 sportloveszet onmukodo_sportpisztoly
|
||||
2 1 uszas 400m_gyorsuszas
|
||||
2 1 uszas 200m_melluszas
|
||||
2 1 kajakkenu kenu_egyes_10000m
|
||||
2 1 kajakkenu kajak_egyes_1000m
|
||||
2 1 birkozas kotott_fogas_pehelysuly
|
||||
2 8 torna noi_osszetett_csapat
|
||||
3 1 sportloveszet sportpisztoly
|
||||
3 1 vivas kardvivas_egyeni
|
||||
3 1 atletika tavolugras
|
||||
3 1 birkozas szabad_fogas_kozepsuly
|
||||
3 1 torna felemas_korlat
|
||||
3 1 torna osszetett_egyeni
|
||||
3 1 torna gerenda
|
||||
3 1 torna talajtorna
|
||||
3 1 atletika kalapacsvetes
|
||||
3 1 atletika 50km_gyaloglas
|
||||
3 1 ottusa ottusa_egyeni
|
||||
3 1 uszas 100m_gyorsuszas
|
||||
3 4 atletika 4x100m_valtofutas
|
||||
3 2 kajakkenu kenu_kettes_10000m
|
||||
3 8 torna keziszer_csapat
|
||||
3 6 vivas torvivas_csapat
|
||||
4 1 torna gerenda
|
||||
4 1 uszas 200m_mell
|
||||
4 1 birkozas kotottfogas_felnehezsuly
|
||||
4 1 torna talaj
|
||||
4 1 birkozas kotottfogas_kozepsuly
|
||||
4 1 birkozas kotottfogas_konnyusuly
|
||||
5 1 okolvivas pehelysuly
|
||||
5 1 okolvivas konnyusuly
|
||||
5 1 uszas 100m_gyors
|
||||
5 1 atletika diszkoszvetes
|
||||
5 1 vivas parbajtor_egyeni
|
||||
5 2 kajak<61>kenu kenu_kettes_1000m
|
||||
5 2 kerekparozas ketuleses_verseny
|
||||
5 4 uszas 4<>200m_gyorsvalto
|
||||
5 5 vivas parbajtor_csapat
|
||||
6 1 birkozas kotottfogas_legsuly
|
||||
6 1 kajak<61>kenu kajak_egyes_500m
|
||||
6 1 torna osszetett_egyeni
|
||||
6 1 kerekparozas repuloverseny
|
||||
6 1 uszas 400m_gyors
|
||||
6 1 torna felemaskorlat
|
||||
6 8 torna osszetett_csapat
|
||||
Reference in New Issue
Block a user