finished homework
This commit is contained in:
parent
bcd8982b11
commit
6bc4e13d38
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,12 +1,24 @@
|
|||
DataRead();
|
||||
using System.IO;
|
||||
|
||||
DataRead();
|
||||
Varos legmelegebb = Legmelegebb();
|
||||
Console.WriteLine($"{legmelegebb.Nev} {legmelegebb.Homerseklet}");
|
||||
Console.WriteLine($"Legmelegebb: {legmelegebb.Nev} {legmelegebb.Homerseklet}");
|
||||
Varos leghidegebb = Leghidegebb();
|
||||
Console.WriteLine($"{leghidegebb.Nev} {leghidegebb.Homerseklet}");
|
||||
Console.WriteLine($"Leghidegebb: {leghidegebb.Nev} {leghidegebb.Homerseklet}");
|
||||
double atlag = Atlag();
|
||||
Console.WriteLine($"Átlag hőmérséklet: {atlag:F2}");
|
||||
//list városok where homerseklet > 20
|
||||
Console.WriteLine("20°C-nál melegebb városok:");
|
||||
foreach (var item in Meleg())
|
||||
{
|
||||
Console.WriteLine($"\t{item.Nev}: {item.Homerseklet}°C");
|
||||
}
|
||||
|
||||
|
||||
static IEnumerable<Varos> Meleg()
|
||||
{
|
||||
return Data.varosok.Where(x => x.Homerseklet > 20);
|
||||
}
|
||||
static double Atlag()
|
||||
{
|
||||
return Data.varosok.Average(x => x.Homerseklet);
|
||||
|
@ -26,7 +38,7 @@ static Varos Legmelegebb()
|
|||
|
||||
static void DataRead()
|
||||
{
|
||||
string path = "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\varosok.txt";
|
||||
string path = "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\bin\\Debug\\varosok.txt";
|
||||
using (StreamReader streamReader = new StreamReader(path))
|
||||
{
|
||||
string line = streamReader.ReadLine();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
20240920/ConsoleApp2/ConsoleApp2/bin/Debug/varosok.txt
Normal file
18
20240920/ConsoleApp2/ConsoleApp2/bin/Debug/varosok.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
Város,Hőmérséklet
|
||||
Budapest,22
|
||||
Debrecen,19
|
||||
Szeged,24
|
||||
Pécs,21
|
||||
Győr,18
|
||||
Székesfehérvár,20
|
||||
Miskolc,17
|
||||
Nyíregyháza,16
|
||||
Kecskemét,23
|
||||
Zalaegerszeg,18
|
||||
Tatabánya,20
|
||||
Sopron,19
|
||||
Szombathely,22
|
||||
Békéscsaba,21
|
||||
Érd,20
|
||||
Siófok,25
|
||||
Kaposvár,17
|
|
@ -1,20 +1,24 @@
|
|||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj": {}
|
||||
"E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj": {
|
||||
"E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"projectUniqueName": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"projectName": "ConsoleApp2",
|
||||
"projectPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"packagesPath": "C:\\Users\\szabomarton\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\obj\\",
|
||||
"projectPath": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"packagesPath": "C:\\Users\\Marci\\.nuget\\packages\\",
|
||||
"outputPath": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\szabomarton\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Users\\Marci\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
|
@ -34,11 +38,6 @@
|
|||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
|
@ -60,7 +59,7 @@
|
|||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\szabomarton\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Marci\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.8.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\szabomarton\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Users\Marci\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -14,7 +14,7 @@ using System.Reflection;
|
|||
[assembly: System.Reflection.AssemblyCompanyAttribute("ConsoleApp2")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+82fc6b674fd1265407cef9381f915f8fb7df93c7")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bcd8982b112f9605eade8cd33e48b41d42ac5983")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ConsoleApp2")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ConsoleApp2")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
|
|
@ -1 +1 @@
|
|||
689549fe51d153fc5f381a183ba624cac369dd48a7be85a2b1c61abb3a853dc8
|
||||
5debd365cc6b6201116e6fc75a0c07e73ebf2a38c98dada38c2c585506d1ce81
|
||||
|
|
|
@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly =
|
|||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = ConsoleApp2
|
||||
build_property.ProjectDir = C:\Users\szabomarton\Desktop\C#\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\
|
||||
build_property.ProjectDir = E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
18ad58a4a862825168fc500f7f1e04509977c1e3da94c2a4ab1f91d365d5f40b
|
||||
e88c81800167b70be5646af32175f3492a72f79ac4ecb1b53733095c9c575f8e
|
||||
|
|
|
@ -12,3 +12,17 @@ C:\Users\szabomarton\Desktop\C#\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\De
|
|||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.pdb
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.genruntimeconfig.cache
|
||||
C:\Users\szabomarton\Desktop\C#\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ref\ConsoleApp2.dll
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\bin\Debug\net8.0\ConsoleApp2.exe
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\bin\Debug\net8.0\ConsoleApp2.deps.json
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\bin\Debug\net8.0\ConsoleApp2.runtimeconfig.json
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\bin\Debug\net8.0\ConsoleApp2.dll
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\bin\Debug\net8.0\ConsoleApp2.pdb
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.GeneratedMSBuildEditorConfig.editorconfig
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.AssemblyInfoInputs.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.AssemblyInfo.cs
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.csproj.CoreCompileInputs.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.dll
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\refint\ConsoleApp2.dll
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.pdb
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ConsoleApp2.genruntimeconfig.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20240920\ConsoleApp2\ConsoleApp2\obj\Debug\net8.0\ref\ConsoleApp2.dll
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
2629f07ba15577b1c9eed9ff991ca0c682fb80978d3abeb885542c641f6e96ba
|
||||
137e08034fd950d103bffaaf2c3e3adbb1dc5b2844f335009417af2edf3c7416
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -8,19 +8,24 @@
|
|||
"net8.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\szabomarton\\.nuget\\packages\\": {}
|
||||
"C:\\Users\\Marci\\.nuget\\packages\\": {},
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"projectUniqueName": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"projectName": "ConsoleApp2",
|
||||
"projectPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"packagesPath": "C:\\Users\\szabomarton\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\obj\\",
|
||||
"projectPath": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"packagesPath": "C:\\Users\\Marci\\.nuget\\packages\\",
|
||||
"outputPath": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\szabomarton\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Users\\Marci\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
|
@ -40,11 +45,6 @@
|
|||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
|
@ -66,7 +66,7 @@
|
|||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.101/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "0sx9Yfcwk0I=",
|
||||
"dgSpecHash": "fYLlihRverYZYMGoyNOpw1xVqw87ZL33gw2pK0lCELwi60FtP+kgPwZbr6JPyD74LRVpQ5ocO0DCfxIuPp24Eg==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\szabomarton\\Desktop\\C#\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"projectFilePath": "E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20240920\\ConsoleApp2\\ConsoleApp2\\ConsoleApp2.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user