-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
229 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.3.32804.467 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hourglass", "Hourglass\Hourglass.csproj", "{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {75F67AF3-B2E0-4BA1-995F-F6E3379CBC66} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>{91DD59A1-03EE-45D3-A4B1-0737D1A06C71}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>Hourglass</RootNamespace> | ||
<AssemblyName>Hourglass</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Hourglass | ||
{ | ||
internal class Program | ||
{ | ||
|
||
static void DrawHourglass(int rows) | ||
{ | ||
if (rows % 2 != 1) | ||
{ | ||
rows++; | ||
} | ||
int totalColunm = rows; | ||
int x = 0; | ||
for (int i = 0; i < rows; i++) | ||
{ | ||
Console.Write("\t\t"); | ||
for (int j = 0; j < rows; j++) | ||
{ | ||
if (j % 2 == 0 && (i == 0 || i == rows - 1) || j == i || j == totalColunm - i - 1) | ||
{ | ||
Console.Write("*"); | ||
} | ||
else | ||
{ | ||
Console.Write(" "); | ||
} | ||
} | ||
|
||
Console.WriteLine(); | ||
} | ||
|
||
} | ||
|
||
|
||
static void DrawHourglass2(int rows) | ||
{ | ||
if (rows % 2 != 1) | ||
{ | ||
rows++; | ||
} | ||
int totalColunm = rows; | ||
int x = 0; | ||
for (int i = 0; i <= rows; i++) | ||
{ | ||
Console.Write("\t\t"); | ||
for (int j = 0; j < totalColunm; j++) | ||
{ | ||
if (j >= x) | ||
{ | ||
Console.Write("*"); | ||
} | ||
else | ||
{ | ||
Console.Write(" "); | ||
} | ||
} | ||
if (i < rows / 2) | ||
{ | ||
totalColunm--; | ||
x++; | ||
} | ||
else if (i > rows / 2) | ||
{ | ||
totalColunm++; | ||
x--; | ||
} | ||
Console.WriteLine(); | ||
} | ||
|
||
} | ||
|
||
|
||
static void Main(string[] args) | ||
{ | ||
Console.ForegroundColor = ConsoleColor.Red; | ||
DrawHourglass2(22); | ||
Console.WriteLine(); | ||
Console.ForegroundColor = ConsoleColor.Green; | ||
DrawHourglass(22); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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("Hourglass")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("Hourglass")] | ||
[assembly: AssemblyCopyright("Copyright © 2023")] | ||
[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("91dd59a1-03ee-45d3-a4b1-0737d1a06c71")] | ||
|
||
// 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")] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
Hourglass/Hourglass/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] |
Binary file added
BIN
+6.63 KB
Hourglass/Hourglass/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary file not shown.
Binary file added
BIN
+3.98 KB
Hourglass/Hourglass/obj/Debug/Hourglass.csproj.AssemblyReference.cache
Binary file not shown.
1 change: 1 addition & 0 deletions
1
Hourglass/Hourglass/obj/Debug/Hourglass.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7f4b213b428f4c013f19137338418ee1f5525793 |
8 changes: 8 additions & 0 deletions
8
Hourglass/Hourglass/obj/Debug/Hourglass.csproj.FileListAbsolute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\bin\Debug\Hourglass.exe.config | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\bin\Debug\Hourglass.exe | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\bin\Debug\Hourglass.pdb | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\obj\Debug\Hourglass.csproj.AssemblyReference.cache | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\obj\Debug\Hourglass.csproj.SuggestedBindingRedirects.cache | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\obj\Debug\Hourglass.csproj.CoreCompileInputs.cache | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\obj\Debug\Hourglass.exe | ||
C:\Users\Elad\source\repos\Shapes\Hourglass\Hourglass\obj\Debug\Hourglass.pdb |
Empty file.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj\Debug\\_IsIncrementalBuild |
Binary file not shown.