Gyak2
This commit is contained in:
@@ -10,7 +10,27 @@
|
||||
"ProjectGuid": "b1ffc5c5-05eb-454b-bc64-505e246ca686",
|
||||
"DisplayName": "Szamkitalalo",
|
||||
"ColorIndex": 1
|
||||
},
|
||||
"8812376d-8182-4569-972d-a83c8239ca36": {
|
||||
"ProjectGuid": "8812376d-8182-4569-972d-a83c8239ca36",
|
||||
"DisplayName": "MinMax",
|
||||
"ColorIndex": 2
|
||||
},
|
||||
"81ea1bcf-48a1-4c1b-b6a9-23d49dc2e820": {
|
||||
"ProjectGuid": "81ea1bcf-48a1-4c1b-b6a9-23d49dc2e820",
|
||||
"DisplayName": "Szigetek",
|
||||
"ColorIndex": 3
|
||||
},
|
||||
"8d40bf01-637c-428a-b86d-805e42e109b4": {
|
||||
"ProjectGuid": "8d40bf01-637c-428a-b86d-805e42e109b4",
|
||||
"DisplayName": "AtlagHom",
|
||||
"ColorIndex": 4
|
||||
},
|
||||
"406a5bb9-3836-40ab-b742-5bbe18bad1ed": {
|
||||
"ProjectGuid": "406a5bb9-3836-40ab-b742-5bbe18bad1ed",
|
||||
"DisplayName": "BuborekRendezes",
|
||||
"ColorIndex": 5
|
||||
}
|
||||
},
|
||||
"NextColorIndex": 2
|
||||
"NextColorIndex": 6
|
||||
}
|
||||
Binary file not shown.
6
AtlagHom/App.config
Normal file
6
AtlagHom/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
AtlagHom/AtlagHom.csproj
Normal file
53
AtlagHom/AtlagHom.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>{8D40BF01-637C-428A-B86D-805E42E109B4}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>AtlagHom</RootNamespace>
|
||||
<AssemblyName>AtlagHom</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>
|
||||
104
AtlagHom/Program.cs
Normal file
104
AtlagHom/Program.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AtlagHom {
|
||||
internal class Program {
|
||||
static void Main(string[] args) {
|
||||
int[,] data = new int[12,30];
|
||||
Random random = new Random();
|
||||
|
||||
//random adatok
|
||||
for (int i = 0; i < data.GetLength(0); i++) {
|
||||
for (int j = 0; j < data.GetLength(1); j++) {
|
||||
data[i, j] = random.Next(-10, 40);
|
||||
Console.Write("{0} ",data[i,j]);
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
int min = Int32.MaxValue;
|
||||
int min_i = -1;
|
||||
int min_j = -1;
|
||||
int max = Int32.MinValue;
|
||||
int max_i = -1;
|
||||
int max_j = -1;
|
||||
int honap_hom_sum = 0;
|
||||
float[] honap_hom = new float[12];
|
||||
int index = -1;
|
||||
bool day = false;
|
||||
int day_count = 0;
|
||||
|
||||
for (int i = 0; i < data.GetLength(0); i++) {
|
||||
for (int j = 0; j < data.GetLength(1); j++) {
|
||||
//min es max homerseklet keresese
|
||||
if (data[i, j] < min) {
|
||||
min = data[i, j];
|
||||
min_i = i;
|
||||
min_j = j;
|
||||
}
|
||||
if(data[i, j] > max) {
|
||||
max = data[i, j];
|
||||
max_i = i;
|
||||
max_j = j;
|
||||
}
|
||||
//akt honap hom sum
|
||||
honap_hom_sum += data[i, j];
|
||||
|
||||
//ot nap minusz
|
||||
if (!day) {
|
||||
if (data[i, j] < 0) {
|
||||
day_count++;
|
||||
} else {
|
||||
day_count = 0;
|
||||
}
|
||||
if (day_count == 5) {
|
||||
day = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//honapok atlag homerseklete
|
||||
honap_hom[++index] = honap_hom_sum / 30;
|
||||
honap_hom_sum = 0; //akt honap nullazasa
|
||||
}
|
||||
|
||||
//ot minusz egymas utan
|
||||
if (day) {
|
||||
Console.WriteLine("Volt egymas utan ot nap minusz fok");
|
||||
} else {
|
||||
Console.WriteLine("Nem volt egymas utan ot nap minusz fok");
|
||||
}
|
||||
|
||||
Console.WriteLine("Az ev legmelegebb napja: {0}, {1}", max_i, max_j);
|
||||
Console.WriteLine("Az ev leghidegebb napja: {0}, {1}", min_i, min_j);
|
||||
Console.WriteLine();
|
||||
|
||||
float min_honap = 100;
|
||||
float max_honap = -100;
|
||||
|
||||
for (int i = 0; i < honap_hom.Length; i++) {
|
||||
Console.Write("{0} ",honap_hom[i]);
|
||||
}
|
||||
|
||||
//min es max honap atlag hom keresese
|
||||
for (int i = 0; i < honap_hom.Length; i++) {
|
||||
if(min_honap > honap_hom[i]) {
|
||||
min_i = i;
|
||||
min_honap = honap_hom[i];
|
||||
}
|
||||
if(max_honap < honap_hom[i]) {
|
||||
max_i = i;
|
||||
max_honap = honap_hom[i];
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("\nLegmelegebb honap: {0}", (max_i+1));
|
||||
Console.WriteLine("Leghidegebb honap: {0}", (min_i+1));
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
AtlagHom/Properties/AssemblyInfo.cs
Normal file
36
AtlagHom/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("AtlagHom")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("AtlagHom")]
|
||||
[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("8d40bf01-637c-428a-b86d-805e42e109b4")]
|
||||
|
||||
// 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
AtlagHom/bin/Debug/AtlagHom.exe
Normal file
BIN
AtlagHom/bin/Debug/AtlagHom.exe
Normal file
Binary file not shown.
6
AtlagHom/bin/Debug/AtlagHom.exe.config
Normal file
6
AtlagHom/bin/Debug/AtlagHom.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
AtlagHom/bin/Debug/AtlagHom.pdb
Normal file
BIN
AtlagHom/bin/Debug/AtlagHom.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")]
|
||||
BIN
AtlagHom/obj/Debug/AtlagHom.csproj.AssemblyReference.cache
Normal file
BIN
AtlagHom/obj/Debug/AtlagHom.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
7f4b213b428f4c013f19137338418ee1f5525793
|
||||
8
AtlagHom/obj/Debug/AtlagHom.csproj.FileListAbsolute.txt
Normal file
8
AtlagHom/obj/Debug/AtlagHom.csproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
C:\dev\c#\AtlagHom\bin\Debug\AtlagHom.exe.config
|
||||
C:\dev\c#\AtlagHom\bin\Debug\AtlagHom.exe
|
||||
C:\dev\c#\AtlagHom\bin\Debug\AtlagHom.pdb
|
||||
C:\dev\c#\AtlagHom\obj\Debug\AtlagHom.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\AtlagHom\obj\Debug\AtlagHom.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\AtlagHom\obj\Debug\AtlagHom.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\AtlagHom\obj\Debug\AtlagHom.exe
|
||||
C:\dev\c#\AtlagHom\obj\Debug\AtlagHom.pdb
|
||||
BIN
AtlagHom/obj/Debug/AtlagHom.exe
Normal file
BIN
AtlagHom/obj/Debug/AtlagHom.exe
Normal file
Binary file not shown.
BIN
AtlagHom/obj/Debug/AtlagHom.pdb
Normal file
BIN
AtlagHom/obj/Debug/AtlagHom.pdb
Normal file
Binary file not shown.
Binary file not shown.
6
BuborekRendezes/App.config
Normal file
6
BuborekRendezes/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
BuborekRendezes/BuborekRendezes.csproj
Normal file
53
BuborekRendezes/BuborekRendezes.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>{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>BuborekRendezes</RootNamespace>
|
||||
<AssemblyName>BuborekRendezes</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>
|
||||
35
BuborekRendezes/Program.cs
Normal file
35
BuborekRendezes/Program.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BuborekRendezes {
|
||||
internal class Program {
|
||||
static void Main(string[] args) {
|
||||
int[] array = new int[10];
|
||||
Random random = new Random();
|
||||
|
||||
//random elemekkel feltoltes
|
||||
for (int i = 0; i < array.Length; i++) {
|
||||
array[i] = random.Next(1, 100000);
|
||||
}
|
||||
|
||||
for (int i = 0; i < array.Length - 1; ++i) {
|
||||
for (int j = array.Length - 1; j > i; --j) {
|
||||
if (array[j - 1] > array[j]) {
|
||||
int tmp = array[j];
|
||||
array[j] = array[j - 1];
|
||||
array[j - 1] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < array.Length; i++) {
|
||||
Console.WriteLine(array[i]);
|
||||
}
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
BuborekRendezes/Properties/AssemblyInfo.cs
Normal file
36
BuborekRendezes/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("BuborekRendezes")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("BuborekRendezes")]
|
||||
[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("406a5bb9-3836-40ab-b742-5bbe18bad1ed")]
|
||||
|
||||
// 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
BuborekRendezes/bin/Debug/BuborekRendezes.exe
Normal file
BIN
BuborekRendezes/bin/Debug/BuborekRendezes.exe
Normal file
Binary file not shown.
6
BuborekRendezes/bin/Debug/BuborekRendezes.exe.config
Normal file
6
BuborekRendezes/bin/Debug/BuborekRendezes.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
BuborekRendezes/bin/Debug/BuborekRendezes.pdb
Normal file
BIN
BuborekRendezes/bin/Debug/BuborekRendezes.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")]
|
||||
@@ -0,0 +1 @@
|
||||
7f4b213b428f4c013f19137338418ee1f5525793
|
||||
@@ -0,0 +1,7 @@
|
||||
C:\dev\c#\BuborekRendezes\bin\Debug\BuborekRendezes.exe.config
|
||||
C:\dev\c#\BuborekRendezes\bin\Debug\BuborekRendezes.exe
|
||||
C:\dev\c#\BuborekRendezes\bin\Debug\BuborekRendezes.pdb
|
||||
C:\dev\c#\BuborekRendezes\obj\Debug\BuborekRendezes.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\BuborekRendezes\obj\Debug\BuborekRendezes.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\BuborekRendezes\obj\Debug\BuborekRendezes.exe
|
||||
C:\dev\c#\BuborekRendezes\obj\Debug\BuborekRendezes.pdb
|
||||
BIN
BuborekRendezes/obj/Debug/BuborekRendezes.exe
Normal file
BIN
BuborekRendezes/obj/Debug/BuborekRendezes.exe
Normal file
Binary file not shown.
BIN
BuborekRendezes/obj/Debug/BuborekRendezes.pdb
Normal file
BIN
BuborekRendezes/obj/Debug/BuborekRendezes.pdb
Normal file
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,7 @@ namespace MinMax {
|
||||
static void Main(string[] args) {
|
||||
Random random = new Random();
|
||||
|
||||
int[] arr = new int[1000];
|
||||
int[] arr = new int[Int32.MaxValue/8];
|
||||
|
||||
//random elemek hozzaadasa a tombhoz
|
||||
for (int i = 0; i < arr.Length; i++) {
|
||||
@@ -24,15 +24,22 @@ namespace MinMax {
|
||||
|
||||
int min = Int32.MaxValue;
|
||||
int min_i = -1;
|
||||
int max = Int32.MinValue;
|
||||
int max_i = -1;
|
||||
|
||||
for (int i = 0; i < arr.Length; i++) {
|
||||
if(min > arr[i]) {
|
||||
min = arr[i];
|
||||
min_i = i;
|
||||
}
|
||||
if (max < arr[i]) {
|
||||
max = arr[i];
|
||||
max_i = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine("Min ertek: {0}, helye: {1}",min,min_i);
|
||||
Console.WriteLine("Max ertek: {0}, helye: {1}", max, max_i);
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,3 +5,11 @@ C:\dev\c#\c-sharp\MinMax\obj\Debug\MinMax.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\c-sharp\MinMax\obj\Debug\MinMax.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\c-sharp\MinMax\obj\Debug\MinMax.exe
|
||||
C:\dev\c#\c-sharp\MinMax\obj\Debug\MinMax.pdb
|
||||
C:\dev\c#\MinMax\bin\Debug\MinMax.exe.config
|
||||
C:\dev\c#\MinMax\bin\Debug\MinMax.exe
|
||||
C:\dev\c#\MinMax\bin\Debug\MinMax.pdb
|
||||
C:\dev\c#\MinMax\obj\Debug\MinMax.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\MinMax\obj\Debug\MinMax.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\MinMax\obj\Debug\MinMax.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\MinMax\obj\Debug\MinMax.exe
|
||||
C:\dev\c#\MinMax\obj\Debug\MinMax.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6
Szigetek/App.config
Normal file
6
Szigetek/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>
|
||||
49
Szigetek/Program.cs
Normal file
49
Szigetek/Program.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Szigetek {
|
||||
internal class Program {
|
||||
static void Main(string[] args) {
|
||||
int sziget_sorozat = 0;
|
||||
int sziget_sorozat_max = 0;
|
||||
int sziget_sum = 0;
|
||||
int hely = -1;
|
||||
string folytatas = "igen";
|
||||
bool sorozat = false;
|
||||
|
||||
while (folytatas == "igen") {
|
||||
Console.WriteLine("Sziget 1 | Tenger 0");
|
||||
hely = Convert.ToInt32(Console.ReadLine());
|
||||
|
||||
if (hely == 1) {
|
||||
sziget_sum++;
|
||||
sorozat = true;
|
||||
if (sorozat) {
|
||||
sziget_sorozat++;
|
||||
}
|
||||
} else {
|
||||
sorozat = false;
|
||||
sziget_sorozat_max = sziget_sorozat;
|
||||
sziget_sorozat = 0;
|
||||
}
|
||||
|
||||
Console.WriteLine("Akarsz meg megadni adatot? (igen/nem)");
|
||||
folytatas = Console.ReadLine();
|
||||
|
||||
if(folytatas != "igen") {
|
||||
if (sziget_sorozat_max < sziget_sorozat) {
|
||||
sziget_sorozat_max = sziget_sorozat;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Szigetek szama: {0}", sziget_sum);
|
||||
Console.WriteLine("Legtobb osszefuggo szigetek szama: {0}", sziget_sorozat_max);
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Szigetek/Properties/AssemblyInfo.cs
Normal file
36
Szigetek/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("Szigetek")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Szigetek")]
|
||||
[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("81ea1bcf-48a1-4c1b-b6a9-23d49dc2e820")]
|
||||
|
||||
// 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")]
|
||||
53
Szigetek/Szigetek.csproj
Normal file
53
Szigetek/Szigetek.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>{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Szigetek</RootNamespace>
|
||||
<AssemblyName>Szigetek</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>
|
||||
BIN
Szigetek/bin/Debug/Szigetek.exe
Normal file
BIN
Szigetek/bin/Debug/Szigetek.exe
Normal file
Binary file not shown.
6
Szigetek/bin/Debug/Szigetek.exe.config
Normal file
6
Szigetek/bin/Debug/Szigetek.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
Szigetek/bin/Debug/Szigetek.pdb
Normal file
BIN
Szigetek/bin/Debug/Szigetek.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
Szigetek/obj/Debug/Szigetek.csproj.AssemblyReference.cache
Normal file
BIN
Szigetek/obj/Debug/Szigetek.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
7f4b213b428f4c013f19137338418ee1f5525793
|
||||
8
Szigetek/obj/Debug/Szigetek.csproj.FileListAbsolute.txt
Normal file
8
Szigetek/obj/Debug/Szigetek.csproj.FileListAbsolute.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
C:\dev\c#\Szigetek\bin\Debug\Szigetek.exe.config
|
||||
C:\dev\c#\Szigetek\bin\Debug\Szigetek.exe
|
||||
C:\dev\c#\Szigetek\bin\Debug\Szigetek.pdb
|
||||
C:\dev\c#\Szigetek\obj\Debug\Szigetek.csproj.AssemblyReference.cache
|
||||
C:\dev\c#\Szigetek\obj\Debug\Szigetek.csproj.SuggestedBindingRedirects.cache
|
||||
C:\dev\c#\Szigetek\obj\Debug\Szigetek.csproj.CoreCompileInputs.cache
|
||||
C:\dev\c#\Szigetek\obj\Debug\Szigetek.exe
|
||||
C:\dev\c#\Szigetek\obj\Debug\Szigetek.pdb
|
||||
BIN
Szigetek/obj/Debug/Szigetek.exe
Normal file
BIN
Szigetek/obj/Debug/Szigetek.exe
Normal file
Binary file not shown.
BIN
Szigetek/obj/Debug/Szigetek.pdb
Normal file
BIN
Szigetek/obj/Debug/Szigetek.pdb
Normal file
Binary file not shown.
22
c-sharp.sln
22
c-sharp.sln
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32106.194
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.32126.317
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c-sharp", "c-sharp\c-sharp.csproj", "{A6876A09-53D2-47AF-A648-81BAD791D19D}"
|
||||
EndProject
|
||||
@@ -9,6 +9,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Szamkitalalo", "Szamkitalal
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinMax", "MinMax\MinMax.csproj", "{8812376D-8182-4569-972D-A83C8239CA36}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Szigetek", "Szigetek\Szigetek.csproj", "{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AtlagHom", "AtlagHom\AtlagHom.csproj", "{8D40BF01-637C-428A-B86D-805E42E109B4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuborekRendezes", "BuborekRendezes\BuborekRendezes.csproj", "{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -27,6 +33,18 @@ Global
|
||||
{8812376D-8182-4569-972D-A83C8239CA36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8812376D-8182-4569-972D-A83C8239CA36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8812376D-8182-4569-972D-A83C8239CA36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{81EA1BCF-48A1-4C1B-B6A9-23D49DC2E820}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D40BF01-637C-428A-B86D-805E42E109B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D40BF01-637C-428A-B86D-805E42E109B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D40BF01-637C-428A-B86D-805E42E109B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D40BF01-637C-428A-B86D-805E42E109B4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{406A5BB9-3836-40AB-B742-5BBE18BAD1ED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Binary file not shown.
BIN
c-sharp/obj/Debug/c-sharp.csproj.AssemblyReference.cache
Normal file
BIN
c-sharp/obj/Debug/c-sharp.csproj.AssemblyReference.cache
Normal file
Binary file not shown.
Reference in New Issue
Block a user