Add project files.
This commit is contained in:
8
LottoProgram/LottoProgram.csproj
Normal file
8
LottoProgram/LottoProgram.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
18
LottoProgram/LottoSzelveny.cs
Normal file
18
LottoProgram/LottoSzelveny.cs
Normal 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
52
LottoProgram/Lottozo.cs
Normal 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
13
LottoProgram/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace LottoProgram
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Lottozo lottozo = new Lottozo();
|
||||
lottozo.bekeres();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user