Skip to content

Commit

Permalink
Add a solution for issue NishuDissanayake#9
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan-Chanuka committed Oct 5, 2022
1 parent 8201c62 commit 1630965
Show file tree
Hide file tree
Showing 34 changed files with 332 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
25 changes: 25 additions & 0 deletions C#/Ishan-09/AreaOfTrapezoid/AreaOfTrapezoid.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32526.322
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AreaOfTrapezoid", "AreaOfTrapezoid\AreaOfTrapezoid.csproj", "{727617FE-ACED-409C-9C3A-0E7AB0E6375C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{727617FE-ACED-409C-9C3A-0E7AB0E6375C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{727617FE-ACED-409C-9C3A-0E7AB0E6375C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{727617FE-ACED-409C-9C3A-0E7AB0E6375C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{727617FE-ACED-409C-9C3A-0E7AB0E6375C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F0D90595-1BB8-4D7E-AB58-9E1CD6880BD5}
EndGlobalSection
EndGlobal
10 changes: 10 additions & 0 deletions C#/Ishan-09/AreaOfTrapezoid/AreaOfTrapezoid/AreaOfTrapezoid.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
22 changes: 22 additions & 0 deletions C#/Ishan-09/AreaOfTrapezoid/AreaOfTrapezoid/Calculation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AreaOfTrapezoid
{
public class Calculation
{
public double ubase { get; set; }
public double lbase { get; set; }
public double height { get; set; }

public double AreaOfTrapezoid()
{
double area = (ubase + lbase) / 2 * height;

return area;
}
}
}
16 changes: 16 additions & 0 deletions C#/Ishan-09/AreaOfTrapezoid/AreaOfTrapezoid/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using AreaOfTrapezoid;

Calculation cal = new Calculation();

Console.WriteLine("Enter the lower base value of the Trapezoid : ");
cal.lbase = double.Parse(Console.ReadLine());

Console.WriteLine("Enter the upper base value of the Trapezoid : ");
cal.ubase = double.Parse(Console.ReadLine());

Console.WriteLine("Enter the height value of the Trapezoid : ");
cal.height = double.Parse(Console.ReadLine());

double area = cal.AreaOfTrapezoid();

Console.WriteLine($"The area of the Trapezoid : {area}");
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"AreaOfTrapezoid/1.0.0": {
"runtime": {
"AreaOfTrapezoid.dll": {}
}
}
}
},
"libraries": {
"AreaOfTrapezoid/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"format": 1,
"restore": {
"E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj": {}
},
"projects": {
"E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj",
"projectName": "AreaOfTrapezoid",
"projectPath": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\admin\\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": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<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\admin\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\admin\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("AreaOfTrapezoid")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("AreaOfTrapezoid")]
[assembly: System.Reflection.AssemblyTitleAttribute("AreaOfTrapezoid")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dcef663d506cb406836d8a20db01315c9a06fd16
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = AreaOfTrapezoid
build_property.ProjectDir = E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d0c883719df381fdc9da3928274379a9f571de52
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\bin\Debug\net6.0\AreaOfTrapezoid.exe
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\bin\Debug\net6.0\AreaOfTrapezoid.deps.json
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\bin\Debug\net6.0\AreaOfTrapezoid.runtimeconfig.json
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\bin\Debug\net6.0\AreaOfTrapezoid.dll
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\bin\Debug\net6.0\AreaOfTrapezoid.pdb
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.csproj.AssemblyReference.cache
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.GeneratedMSBuildEditorConfig.editorconfig
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.AssemblyInfoInputs.cache
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.AssemblyInfo.cs
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.csproj.CoreCompileInputs.cache
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.dll
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\refint\AreaOfTrapezoid.dll
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.pdb
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\AreaOfTrapezoid.genruntimeconfig.cache
E:\Project\Hacktoberfest 2022\Hacktoberfest_2022\C#\Ishan-09\AreaOfTrapezoid\AreaOfTrapezoid\obj\Debug\net6.0\ref\AreaOfTrapezoid.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
23ba9db5a38258d2d8ee26d510a67cf24d67a8f0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"version": 3,
"targets": {
"net6.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net6.0": []
},
"packageFolders": {
"C:\\Users\\admin\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj",
"projectName": "AreaOfTrapezoid",
"projectPath": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj",
"packagesPath": "C:\\Users\\admin\\.nuget\\packages\\",
"outputPath": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\admin\\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": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 2,
"dgSpecHash": "R4LNiuf3DTCBbjlexjQgxf41p0AA2STbfVqDnS8S5zEDj9x54ZI95rbQi1NgIGXbFOximJKxTJ+qrH3PomJupw==",
"success": true,
"projectFilePath": "E:\\Project\\Hacktoberfest 2022\\Hacktoberfest_2022\\C#\\Ishan-09\\AreaOfTrapezoid\\AreaOfTrapezoid\\AreaOfTrapezoid.csproj",
"expectedPackageFiles": [],
"logs": []
}

0 comments on commit 1630965

Please sign in to comment.