diff --git a/Lesson_1/Task_4/Program.cs b/Lesson_1/Task_4/Program.cs new file mode 100644 index 0000000..d1e3086 --- /dev/null +++ b/Lesson_1/Task_4/Program.cs @@ -0,0 +1,19 @@ +Console.Write("Enter string 1: "); + +string? string1 = Console.ReadLine(); + +Console.Write("Enter string 2: "); + +string? string2 = Console.ReadLine(); + +if (string1 == null || string2 == null) +{ +} +else if (string1.Length > string2.Length) + Console.WriteLine(string1 + string2); +else if (string1.Length < string2.Length) +{ + string[] split = string2.Split(string1[0]); + foreach (string value in split) + Console.WriteLine(value); +} diff --git a/Lesson_1/Task_4/Task_4.csproj b/Lesson_1/Task_4/Task_4.csproj new file mode 100644 index 0000000..f02677b --- /dev/null +++ b/Lesson_1/Task_4/Task_4.csproj @@ -0,0 +1,10 @@ + + + + Exe + net7.0 + enable + enable + + +