Add project files.
This commit is contained in:
parent
d7f5e7ec45
commit
e914887fab
25
MeccsDoga.sln
Normal file
25
MeccsDoga.sln
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.11.35312.102
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeccsDoga", "MeccsDoga\MeccsDoga.csproj", "{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {F2FA4E20-43F7-469D-9A7A-294A3579A485}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
6
MeccsDoga/App.config
Normal file
6
MeccsDoga/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
MeccsDoga/MeccsDoga.csproj
Normal file
57
MeccsDoga/MeccsDoga.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>{9B02A318-1117-4C46-AC44-5E97A5DC5B3D}</ProjectGuid>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RootNamespace>MeccsDoga</RootNamespace>
|
||||||
|
<AssemblyName>MeccsDoga</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="SajatBeolvaso.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="bin\Debug\merkozesek.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
54
MeccsDoga/Program.cs
Normal file
54
MeccsDoga/Program.cs
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.Design;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MeccsDoga
|
||||||
|
{
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.ForegroundColor = ConsoleColor.DarkMagenta;
|
||||||
|
//Beolvasás első
|
||||||
|
string[] sorok = File.ReadAllLines(@"C:\Users\szabotamasd\Downloads\merkozesek.txt");
|
||||||
|
Console.WriteLine(sorok[0]);
|
||||||
|
Console.WriteLine("Add meg egy forduló sorszámát (1-20):");
|
||||||
|
int fordulo = int.Parse(Console.ReadLine());
|
||||||
|
Console.WriteLine($"2. feladat \nA {fordulo}. forduló mérkőzései: ");
|
||||||
|
int hazai = 0;
|
||||||
|
int vendeg = 0;
|
||||||
|
int dontetlen = 0;
|
||||||
|
foreach (var sor in sorok)
|
||||||
|
{
|
||||||
|
string[] adatatsor = sor.Split(' ');
|
||||||
|
int fordsor = int.Parse(adatatsor[0]);
|
||||||
|
if (fordsor == fordulo)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{adatatsor[3]} - {adatatsor[4]}: {adatatsor[1]}-{adatatsor[2]}");
|
||||||
|
}
|
||||||
|
if (int.Parse(adatatsor[1]) > int.Parse(adatatsor[2]))
|
||||||
|
{
|
||||||
|
hazai++;
|
||||||
|
}
|
||||||
|
else if ((int.Parse(adatatsor[1]) == int.Parse(adatatsor[2])))
|
||||||
|
{
|
||||||
|
dontetlen++;
|
||||||
|
}
|
||||||
|
else { vendeg++; }
|
||||||
|
}
|
||||||
|
Console.WriteLine("3. feladat");
|
||||||
|
Console.WriteLine($"Hazai győzelem: {hazai} mérkőzésen");
|
||||||
|
Console.WriteLine($"Vendég győzelem: {vendeg} mérkőzésen");
|
||||||
|
Console.WriteLine($"Döntetlen: {dontetlen} mérkőzésen");
|
||||||
|
|
||||||
|
Console.WriteLine("\nMásik megoldás Saját olvasóval:");
|
||||||
|
SajatBeolvaso sajatBeolvaso = new SajatBeolvaso();
|
||||||
|
sajatBeolvaso.Vegrehajt();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
MeccsDoga/Properties/AssemblyInfo.cs
Normal file
33
MeccsDoga/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("MeccsDoga")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("MeccsDoga")]
|
||||||
|
[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("9b02a318-1117-4c46-ac44-5e97a5dc5b3d")]
|
||||||
|
|
||||||
|
// 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")]
|
44
MeccsDoga/SajatBeolvaso.cs
Normal file
44
MeccsDoga/SajatBeolvaso.cs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MeccsDoga
|
||||||
|
{
|
||||||
|
internal class SajatBeolvaso
|
||||||
|
{
|
||||||
|
public void Vegrehajt()
|
||||||
|
{
|
||||||
|
StreamReader olvaso = new StreamReader("merkozesek.txt");
|
||||||
|
//string elsosor = olvaso.ReadLine();
|
||||||
|
//Console.WriteLine(elsosor);
|
||||||
|
int fordulo = int.Parse(Console.ReadLine());
|
||||||
|
Console.WriteLine($"2. feladat \nA {fordulo}. forduló mérkőzései: ");
|
||||||
|
int hazai = 0;
|
||||||
|
int vendeg = 0;
|
||||||
|
int dontetlen = 0;
|
||||||
|
while (!olvaso.EndOfStream)
|
||||||
|
{
|
||||||
|
string sor = olvaso.ReadLine();
|
||||||
|
string[] adatatsor = sor.Split(' ');
|
||||||
|
int fordsor = int.Parse(adatatsor[0]);
|
||||||
|
if (fordsor == fordulo)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{adatatsor[3]} - {adatatsor[4]}: {adatatsor[1]}-{adatatsor[2]}");
|
||||||
|
}
|
||||||
|
if (int.Parse(adatatsor[1]) > int.Parse(adatatsor[2]))
|
||||||
|
{
|
||||||
|
hazai++;
|
||||||
|
}
|
||||||
|
else if ((int.Parse(adatatsor[1]) == int.Parse(adatatsor[2])))
|
||||||
|
{
|
||||||
|
dontetlen++;
|
||||||
|
}
|
||||||
|
else { vendeg++; }
|
||||||
|
}
|
||||||
|
olvaso.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user