Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Seminars/Seminar07/self/self.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34024.191
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "task01", "task01\task01.csproj", "{C1607A71-ECCB-4070-8333-52CD6D94F291}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "task02", "task02\task02.csproj", "{8F5E6A22-C691-409C-A1B5-702E90740FDA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "task03", "task03\task03.csproj", "{61233CDC-9951-47C5-8D70-DDF4CBDC6EBA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C1607A71-ECCB-4070-8333-52CD6D94F291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1607A71-ECCB-4070-8333-52CD6D94F291}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1607A71-ECCB-4070-8333-52CD6D94F291}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1607A71-ECCB-4070-8333-52CD6D94F291}.Release|Any CPU.Build.0 = Release|Any CPU
{8F5E6A22-C691-409C-A1B5-702E90740FDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F5E6A22-C691-409C-A1B5-702E90740FDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F5E6A22-C691-409C-A1B5-702E90740FDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F5E6A22-C691-409C-A1B5-702E90740FDA}.Release|Any CPU.Build.0 = Release|Any CPU
{61233CDC-9951-47C5-8D70-DDF4CBDC6EBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61233CDC-9951-47C5-8D70-DDF4CBDC6EBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61233CDC-9951-47C5-8D70-DDF4CBDC6EBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61233CDC-9951-47C5-8D70-DDF4CBDC6EBA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DDEE7C98-CB1F-4C8F-81AD-C37AE58E4403}
EndGlobalSection
EndGlobal
28 changes: 28 additions & 0 deletions Seminars/Seminar07/self/task01/Methods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace task01
{
public class Methods
{
public static void Triangle(int n)
{
if (n <= 0)
{
return;
}
else
{
string s = "";
for (int i = 1; i <= n; i++)
{
s += '*';
Console.WriteLine(s);
}
}
}
}
}
21 changes: 21 additions & 0 deletions Seminars/Seminar07/self/task01/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
namespace task01
{
internal class Program
{
static void Main()
{

try
{
Console.Write("Введите значение n: ");
int n = int.Parse(Console.ReadLine());
Methods.Triangle(n);
}
catch (FormatException)
{
Console.WriteLine("Введены некорректные данные");
}
}
}
}
10 changes: 10 additions & 0 deletions Seminars/Seminar07/self/task01/task01.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>
43 changes: 43 additions & 0 deletions Seminars/Seminar07/self/task02/Methods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace task02
{
public class Methods
{
public static void Triangle(int n)
{
if (n <= 0)
{
return;
}
else
{
string s = "";
for (int i = 1; i <= n; i++)
{
s += '*';
Console.WriteLine(s);
}
}
}
public static void Ornament(int n, int m)
{
if (m <= 0 || n <= 0)
{
return;
}
else
{
for (int i = 1; i <= m; i++)
{
Triangle(n);
}
}
}
}
}
24 changes: 24 additions & 0 deletions Seminars/Seminar07/self/task02/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

using System;
namespace task02
{
internal class Program
{
static void Main(string[] args)
{
try
{
Console.Write("Введите n: ");
int n = int.Parse(Console.ReadLine());
Console.Write("введите m: ");
int m = int.Parse(Console.ReadLine());
Methods.Ornament(n, m);
}
catch
{
Console.WriteLine("Введены некорректные значения");
}

}
}
}
10 changes: 10 additions & 0 deletions Seminars/Seminar07/self/task02/task02.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>
52 changes: 52 additions & 0 deletions Seminars/Seminar07/self/task03/Methods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace task02
{
public class Methods
{
public static void Triangle(int n, int m)
{
if (n <= 0)
{
return;
}
else
{
int qstar = 1;
int qspace = n - 1;
for (int i = 1; i <= n; i++)
{
string s = "";
for (int k1 = 1; k1 <= qstar; k1++)
{
s += "*";
}
for (int k2 = 1; k2 <= qspace; k2++)
{
s += " ";
}
for (int k = 1; k <= m; k++)
{
if (k == m)
{
Console.WriteLine(s);
}
else
{
Console.Write(s);
}
}
++qstar;
--qspace;
}
}
}
}
}

24 changes: 24 additions & 0 deletions Seminars/Seminar07/self/task03/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

using System;

namespace task03
{
internal class Program
{
static void Main(string[] args)
{
try
{
Console.Write("Введите n: ");
int n = int.Parse(Console.ReadLine());
Console.Write("введите m: ");
int m = int.Parse(Console.ReadLine());
Methods.Triangle(n, m);
}
catch
{
Console.WriteLine("Введены некорректные значения");
}
}
}
}
10 changes: 10 additions & 0 deletions Seminars/Seminar07/self/task03/task03.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>