nullable
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
Nullable/App.config
Normal file
6
Nullable/App.config
Normal 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>
|
||||
53
Nullable/Nullable.csproj
Normal file
53
Nullable/Nullable.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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>{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Nullable</RootNamespace>
|
||||
<AssemblyName>Nullable</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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
63
Nullable/Program.cs
Normal file
63
Nullable/Program.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nullable {
|
||||
internal class Program {
|
||||
public static void n_kiir(int?[,] tömb) {
|
||||
for (int i = 0; i < tömb.GetLength(0); i++) {
|
||||
for (int j = 0; j < tömb.GetLength(1); j++) {
|
||||
if(tömb[i,j] == null) {
|
||||
Console.Write("null");
|
||||
|
||||
}
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
static void Main(string[] args) {
|
||||
Console.WriteLine("Adja meg hány soros legyen a mátrixa");
|
||||
int sor = Convert.ToInt32(Console.ReadLine());
|
||||
Console.WriteLine("Adja meg hány oszlopos legyen a mátrixa");
|
||||
int oszlop = Convert.ToInt32(Console.ReadLine());
|
||||
|
||||
int?[,] mátrix = new int?[sor, oszlop];
|
||||
n_kiir(mátrix);
|
||||
|
||||
string folytatas = "igen";
|
||||
while (folytatas == "igen") {
|
||||
Console.WriteLine("Írja be vesszővel elválasztva, hogy a maga által megadott sor, oszlop, milyen értéket adjon. Formátum: sorszám,oszlopszám,érték");
|
||||
string bekeres = Console.ReadLine();
|
||||
string[] beker = bekeres.Split(',');
|
||||
sor = Convert.ToInt32(beker[0]);
|
||||
oszlop = Convert.ToInt32(beker[1]);
|
||||
int ertek = Convert.ToInt32(Math.Round(Convert.ToDouble(beker[2])));
|
||||
|
||||
if (mátrix[sor, oszlop] == null) {
|
||||
mátrix[sor, oszlop] = ertek;
|
||||
} else {
|
||||
Console.WriteLine("Ez a hely már foglalt.");
|
||||
|
||||
}
|
||||
|
||||
Console.WriteLine("Akarod emég folytatni?");
|
||||
folytatas = Console.ReadLine();
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < mátrix.GetLength(0); i++) {
|
||||
for (int j = 0; j < mátrix.GetLength(1); j++) {
|
||||
Console.WriteLine(mátrix[i,j] + " ");
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Nullable/Properties/AssemblyInfo.cs
Normal file
36
Nullable/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
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("Nullable")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Nullable")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2022")]
|
||||
[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("0a107bae-0e3c-452e-8524-abb336cfcc1b")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
BIN
Nullable/bin/Debug/Nullable.exe
Normal file
BIN
Nullable/bin/Debug/Nullable.exe
Normal file
Binary file not shown.
6
Nullable/bin/Debug/Nullable.exe.config
Normal file
6
Nullable/bin/Debug/Nullable.exe.config
Normal 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>
|
||||
BIN
Nullable/bin/Debug/Nullable.pdb
Normal file
BIN
Nullable/bin/Debug/Nullable.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
Binary file not shown.
BIN
Nullable/obj/Debug/Nullable.csproj.AssemblyReference.cache
Normal file
BIN
Nullable/obj/Debug/Nullable.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
7f4b213b428f4c013f19137338418ee1f5525793
|
||||
8
Nullable/obj/Debug/Nullable.csproj.FileListAbsolute.txt
Normal file
8
Nullable/obj/Debug/Nullable.csproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
C:\dev\c#\c-sharp\Nullable\bin\Debug\Nullable.exe.config
|
||||
C:\dev\c#\c-sharp\Nullable\bin\Debug\Nullable.exe
|
||||
C:\dev\c#\c-sharp\Nullable\bin\Debug\Nullable.pdb
|
||||
C:\dev\c#\c-sharp\Nullable\obj\Debug\Nullable.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\c-sharp\Nullable\obj\Debug\Nullable.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\c-sharp\Nullable\obj\Debug\Nullable.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\c-sharp\Nullable\obj\Debug\Nullable.exe
|
||||
C:\dev\c#\c-sharp\Nullable\obj\Debug\Nullable.pdb
|
||||
BIN
Nullable/obj/Debug/Nullable.exe
Normal file
BIN
Nullable/obj/Debug/Nullable.exe
Normal file
Binary file not shown.
BIN
Nullable/obj/Debug/Nullable.pdb
Normal file
BIN
Nullable/obj/Debug/Nullable.pdb
Normal file
Binary file not shown.
@@ -47,6 +47,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForAndForEach", "ForAndForE
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fibonacci", "Fibonacci\Fibonacci.csproj", "{FAE7220C-8E06-4D42-B54C-573A60584C51}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nullable", "Nullable\Nullable.csproj", "{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -141,6 +143,10 @@ Global
|
||||
{FAE7220C-8E06-4D42-B54C-573A60584C51}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FAE7220C-8E06-4D42-B54C-573A60584C51}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FAE7220C-8E06-4D42-B54C-573A60584C51}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0A107BAE-0E3C-452E-8524-ABB336CFCC1B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in New Issue
Block a user