Add project files.

This commit is contained in:
murzsiczmartin
2022-05-20 18:48:25 +02:00
parent db8e363915
commit fa2bc934af
5 changed files with 116 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LottoProgram
{
class LottoSzelveny
{
public int tipus;
public int[] szamok;
public LottoSzelveny(int t)
{
tipus = t;
szamok = new int[tipus];
}
}
}

52
LottoProgram/Lottozo.cs Normal file
View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace LottoProgram
{
class Lottozo
{
public LottoSzelveny[] szelvenyek;
public int szelvenySzam;
public void bekeres()
{
Console.WriteLine("Üdvözlöm a lottózóban! Hány szelvényt szeretne?");
szelvenySzam = int.Parse(Console.ReadLine());
szelvenyek = new LottoSzelveny[szelvenySzam];
//Console.WriteLine(szelvenyek[0]);
for (int i = 0; i < szelvenySzam; i++)
{
int szt = 0;
do
{
Console.WriteLine("Add meg a(z) {0}. szelvény típusát (5,6,7)!", i + 1);
szt = int.Parse(Console.ReadLine());
}
while (szt < 5 || szt > 7);
szelvenyek[i] = new LottoSzelveny(szt);
Console.WriteLine("Add meg a kitöltés módját (Kézi: k vagy Automatikus: a) !");
string mod = Console.ReadLine();
if (mod.ToLower()=="k")
{
}
else if (mod.ToLower() == "g")
{
}
}
private void kezikitoltes(LottoSzelveny sz)
{
Console.WriteLine("A szelvény kitöltése kézi! {0}-s lottó",sz.tipus);
}
}
}
}

13
LottoProgram/Program.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
namespace LottoProgram
{
class Program
{
static void Main(string[] args)
{
Lottozo lottozo = new Lottozo();
lottozo.bekeres();
}
}
}