From 4d4f746b2b5b55d3eb0008d2e9442f079ac29b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20Rudolf?= Date: Fri, 4 Sep 2026 10:18:04 +0200 Subject: [PATCH] =?UTF-8?q?C#=20v=C3=A1ltoz=C3=B3k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Valtozok/Valtozok.slnx | 3 +++ Valtozok/Valtozok/Program.cs | 32 +++++++++++++++++++++++++++++++ Valtozok/Valtozok/Valtozok.csproj | 10 ++++++++++ 3 files changed, 45 insertions(+) create mode 100644 Valtozok/Valtozok.slnx create mode 100644 Valtozok/Valtozok/Program.cs create mode 100644 Valtozok/Valtozok/Valtozok.csproj diff --git a/Valtozok/Valtozok.slnx b/Valtozok/Valtozok.slnx new file mode 100644 index 0000000..b0ad082 --- /dev/null +++ b/Valtozok/Valtozok.slnx @@ -0,0 +1,3 @@ + + + diff --git a/Valtozok/Valtozok/Program.cs b/Valtozok/Valtozok/Program.cs new file mode 100644 index 0000000..af0ffe5 --- /dev/null +++ b/Valtozok/Valtozok/Program.cs @@ -0,0 +1,32 @@ +namespace Valtozok +{ + internal class Program + { + static void Main(string[] args) + { + Console.WriteLine("11b asztali alkalmazások"); + int szam1 = 145; + + uint szam2 = 3376; + + Console.WriteLine(szam1); + + //byte típus + byte kisSzam = 255; + + Console.WriteLine(Convert.ToString(kisSzam,2).PadLeft(8,'0')); + Console.WriteLine(Convert.ToString(szam1, 2).PadLeft(32, '0')); + + //short + short kozepes = 56; + ushort masikKozepes = 45; + + Console.WriteLine(ushort.MaxValue); + Console.WriteLine(short.MaxValue); + + Console.WriteLine($"Ushort max:{ushort.MaxValue},Short max:{short.MaxValue}"); + + + } + } +} diff --git a/Valtozok/Valtozok/Valtozok.csproj b/Valtozok/Valtozok/Valtozok.csproj new file mode 100644 index 0000000..ed9781c --- /dev/null +++ b/Valtozok/Valtozok/Valtozok.csproj @@ -0,0 +1,10 @@ + + + + Exe + net10.0 + enable + enable + + +