added orai
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\",
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|solutionrelative:kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -20,11 +20,11 @@
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Kor\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"RelativeToolTip": "Kor\\Program.cs",
|
||||
"ViewState": "AgIAAGEAAAAAAAAAAAAQwG0AAAA3AAAAAAAAAA==",
|
||||
"ViewState": "AgIAAKgAAAAAAAAAAAAAALsAAAA4AAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-22T11:07:50.634Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\",
|
||||
"WorkspaceRootPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|c:\\users\\szabomarton\\desktop\\c#\\progaora\\20250122\\kor\\kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{08AC5912-8134-4A14-A3EC-C61822BA59AA}|Kor\\Kor.csproj|solutionrelative:kor\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -20,11 +20,11 @@
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Kor\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\Program.cs",
|
||||
"RelativeToolTip": "Kor\\Program.cs",
|
||||
"ViewState": "AgIAAGEAAAAAAAAAAAAQwG0AAAAzAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAKgAAAAAAAAAAAAAALsAAAA4AAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-01-22T11:07:50.634Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
1
20250122/Kor/Kor/.vs/Kor.csproj.dtbcache.json
Normal file
1
20250122/Kor/Kor/.vs/Kor.csproj.dtbcache.json
Normal file
@@ -0,0 +1 @@
|
||||
{"RootPath":"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor","ProjectFileName":"Kor.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20250122\\Kor\\Kor\\bin\\Debug\\Kor.exe","OutputItemRelativePath":"Kor.exe"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]}
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -94,8 +96,60 @@ namespace Kor
|
||||
this.penz = penz;
|
||||
}
|
||||
}
|
||||
|
||||
public class Munkavallalo
|
||||
{
|
||||
public string nev;
|
||||
public string fizetesiKategoria;
|
||||
public int evesSzabadsag;
|
||||
public int kivettSzabadsag = 0;
|
||||
|
||||
public Munkavallalo(string nev, string fizetesiKategoria)
|
||||
{
|
||||
this.nev= nev;
|
||||
this.fizetesiKategoria = fizetesiKategoria;
|
||||
}
|
||||
|
||||
public Munkavallalo(string nev, string fizetesiKategoria, int evesSzabadsag)
|
||||
{
|
||||
this.nev = nev;
|
||||
this.fizetesiKategoria = fizetesiKategoria;
|
||||
this.evesSzabadsag = evesSzabadsag;
|
||||
}
|
||||
|
||||
public int KivehetoNapokSzama()
|
||||
{
|
||||
return evesSzabadsag - kivettSzabadsag;
|
||||
}
|
||||
}
|
||||
|
||||
class Szemely
|
||||
{
|
||||
public string nev;
|
||||
public int magassag;
|
||||
public int kor;
|
||||
|
||||
public Szemely(string nev, int magassag, int kor)
|
||||
{
|
||||
this.nev = nev;
|
||||
this.magassag = magassag;
|
||||
this.kor = kor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
internal class Program
|
||||
{
|
||||
public static bool OsszeIllenek(Szemely szemely1, Szemely szemely2)
|
||||
{
|
||||
if (
|
||||
Math.Abs(szemely1.magassag - szemely2.magassag) <= 10
|
||||
&& Math.Abs(szemely1.kor - szemely2.kor) <= 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Kor kor = new Kor(1);
|
||||
@@ -110,12 +164,29 @@ namespace Kor
|
||||
Sofor sofor = new Sofor("Sanyi", 100000);
|
||||
Auto auto = new Auto("Fiat", 5.3, 100, 100);
|
||||
|
||||
/*
|
||||
while (sofor.penz > 0) {
|
||||
auto.benzintank = 0;
|
||||
benzinkut.Tankolas(auto, sofor);
|
||||
Console.WriteLine($"A sofőr aktuális egyenlege: {sofor.penz}");
|
||||
}
|
||||
*/
|
||||
|
||||
Munkavallalo munkavallalo = new Munkavallalo("Sanyi", "1", 20);
|
||||
Console.WriteLine(munkavallalo.KivehetoNapokSzama());
|
||||
|
||||
|
||||
//4. feladat
|
||||
Szemely lany = new Szemely("Anna", 150, 20);
|
||||
Szemely fiu = new Szemely("Bence", 160, 21);
|
||||
|
||||
if (OsszeIllenek(fiu, lany))
|
||||
{
|
||||
Console.WriteLine("Összeillenek");
|
||||
} else
|
||||
{
|
||||
Console.WriteLine("Nem illenek össze.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,3 +5,10 @@ C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.Asse
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.CoreCompileInputs.cache
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.exe
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.pdb
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe.config
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\bin\Debug\Kor.pdb
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.AssemblyReference.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.csproj.CoreCompileInputs.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.exe
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20250122\Kor\Kor\obj\Debug\Kor.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user