Add project files.

This commit is contained in:
tothgergo
2026-09-22 12:58:58 +02:00
parent 602acd4b30
commit f41cf3e175
7 changed files with 277 additions and 0 deletions

3
Lottoszamok.slnx Normal file
View File

@@ -0,0 +1,3 @@
<Solution>
<Project Path="Lottoszamok/Lottoszamok.csproj" />
</Solution>

6
Lottoszamok/App.config Normal file
View 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>

View File

@@ -0,0 +1,56 @@
<?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>{C4D194DB-89FD-448B-9D3E-B5E9B7E355EE}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Lottoszamok</RootNamespace>
<AssemblyName>Lottoszamok</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" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="lottosz.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

128
Lottoszamok/Program.cs Normal file
View File

@@ -0,0 +1,128 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lottoszamok
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("1.Feladat");
Console.WriteLine("Kérem az 52. hét hiányzó számait");
string bekertszamok = Console.ReadLine();
List<string> lottoszamok = new List<string>();
StreamReader sr = new StreamReader(@"..\..\lottosz.txt");
while (!sr.EndOfStream)
{
lottoszamok.Add(sr.ReadLine());
}
sr.Close();
bekertszamok = bekertszamok.Trim();
List<string> bekertszamokdb_olva = bekertszamok.Split(' ').ToList();
bekertszamokdb_olva.Sort();
bekertszamok = "";
foreach (var szam in bekertszamokdb_olva)
{
bekertszamok = bekertszamok + ' ' + szam.ToString();
}
bekertszamok = bekertszamok.Trim();
Console.WriteLine($"A számok rendezve: {bekertszamok}");
Console.WriteLine("3.Feladat");
Console.WriteLine("Add meg melyik hetet vetítsem");
int valasztotthet = int.Parse(Console.ReadLine());
Console.WriteLine($"4.Feladat\nA választott hét lottószámai: {lottoszamok[valasztotthet]}");
List<int> huzhatoszamok = new List<int>();
for (int i = 1; i < 91; i++)
{
huzhatoszamok.Add(i);
}
List<int> latottszamok = new List<int>();
foreach (var item in lottoszamok)
{
string[] szamfelbontvatemp = item.Split(' ');
foreach (var item1 in szamfelbontvatemp)
{
if (!latottszamok.Contains(int.Parse(item1)))
{
latottszamok.Add(int.Parse(item1));
}
}
}
foreach (var item in lottoszamok)
//ezeket a lottoszámokat még fel kell darabolni
{
if (!latottszamok.Contains(int.Parse(item)))
{
Console.WriteLine($"nem látott szám: {item}");
}
}
//5.feladat maj megy ide
/*
foreach (var item in lottoszamok)
{
Console.WriteLine(item);
}
*/
StreamWriter sw = new StreamWriter(@"..\..\lotto52.txt");
/*
sw.Write($"\n{bekertszamok}");
sw.Close();
*/
}
}
}

View 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("Lottoszamok")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Lottoszamok")]
[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("c4d194db-89fd-448b-9d3e-b5e9b7e355ee")]
// 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")]

0
Lottoszamok/lotto52.txt Normal file
View File

51
Lottoszamok/lottosz.txt Normal file
View File

@@ -0,0 +1,51 @@
37 42 44 61 62
18 42 54 83 89
5 12 31 53 60
1 28 47 56 70
54 56 57 59 71
7 21 33 39 86
21 29 37 48 68
10 21 29 40 87
13 33 73 77 78
2 23 65 71 84
3 21 28 30 33
23 31 42 73 85
4 23 42 61 64
17 60 66 71 85
12 60 66 67 72
46 50 58 62 76
20 32 43 65 73
55 56 58 61 71
18 38 41 67 89
32 41 59 66 79
25 35 37 74 86
1 45 60 61 82
7 20 35 58 83
7 37 40 46 51
2 6 47 74 80
1 5 22 44 88
23 33 34 71 89
4 56 74 77 89
17 18 51 52 75
7 29 30 77 80
17 18 28 35 90
6 24 25 53 79
7 12 18 38 90
25 28 45 55 74
10 29 60 74 86
7 24 25 50 76
20 40 52 54 90
16 30 81 83 87
20 22 23 50 67
59 68 75 80 85
32 45 55 70 78
13 40 55 56 76
3 14 24 73 83
23 25 28 66 76
24 33 34 39 54
12 28 34 61 70
1 4 8 69 74
4 15 46 49 59
24 31 67 71 73
12 26 36 46 49
9 20 21 59 68