From 57713a3136afd65165c7f9a01362691a7972db38 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Sun, 6 Oct 2024 22:30:21 +0300 Subject: [PATCH 1/8] lab3 Melikyan --- golang/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/golang/main.go b/golang/main.go index d2c4e91e..700bea20 100644 --- a/golang/main.go +++ b/golang/main.go @@ -3,5 +3,5 @@ package main import "fmt" func main() { - fmt.Println("Hello world") -} + fmt.Println("Samvel_Melikyan_Artemovich") +} \ No newline at end of file From 9e45a153883bb8a39dc0002273670fbefde1baa7 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Tue, 5 Nov 2024 01:19:50 +0300 Subject: [PATCH 2/8] LAB4 --- golang/LAB4/LAB4.go.txt | 35 +++++++++++++++++++++++++++++++++++ golang/main.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 golang/LAB4/LAB4.go.txt diff --git a/golang/LAB4/LAB4.go.txt b/golang/LAB4/LAB4.go.txt new file mode 100644 index 00000000..3ca58bf0 --- /dev/null +++ b/golang/LAB4/LAB4.go.txt @@ -0,0 +1,35 @@ +package laba4ab + +import ( + "fmt" + "math" +) + +func Calculate(x, a float64) float64 { + y := math.Tan(math.Pow(math.Log10(a+x), 3)) / math.Pow((a+x), 2.0/7.0) + return y +} + +func CalculateB(xValues []float64, a float64) []float64 { + var spb = []float64{} + for _, x := range xValues { + spb = append(spb, Calculate(x, a)) + } + return spb +} + +func CalculateA(xn, xk, deltaX, a float64) []float64 { + var spa = []float64{} + for x := xn; x <= xk; x += deltaX { + spa = append(spa, Calculate(x, a)) + } + return spa +} + +func Readylaba4ab() { + fmt.Print("A\n") + fmt.Print(CalculateA(1.08, 1.88, 0.16, 2), "\n") + fmt.Print("B\n") + var xValues = []float64{1.16, 1.35, 1.48, 1.52, 1.96} + fmt.Print(CalculateB(xValues, 2.0)) +} \ No newline at end of file diff --git a/golang/main.go b/golang/main.go index 700bea20..f5925a82 100644 --- a/golang/main.go +++ b/golang/main.go @@ -4,4 +4,32 @@ import "fmt" func main() { fmt.Println("Samvel_Melikyan_Artemovich") +} + +package main + +import "fmt" +import ( + "fmt" + + "isuct.ru/informatics2022/laba4ab" +) + +func main() { + fmt.Println("Samvel_Melikyan_Artemovich") + laba4ab.Readylaba4ab() +} + +package main + +import "fmt" +import ( + "fmt" + + "isuct.ru/informatics2022/laba4ab" +) + +func main() { + fmt.Println("Melikyan Samvel") + laba4ab.Readylaba4ab() } \ No newline at end of file From b8b4fc372d7324d97e75193acee878d73621ac16 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Mon, 23 Dec 2024 19:28:37 +0300 Subject: [PATCH 3/8] LAB6 --- golang/LAB6/LAB6.go.txt | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 golang/LAB6/LAB6.go.txt diff --git a/golang/LAB6/LAB6.go.txt b/golang/LAB6/LAB6.go.txt new file mode 100644 index 00000000..981262ae --- /dev/null +++ b/golang/LAB6/LAB6.go.txt @@ -0,0 +1,65 @@ +using System; + +public struct Employee +{ + // Переменные + private string name; + private DateTime hireDate; + private string position; + + // Конструктор + public Employee(string name, DateTime hireDate, string position) + { + this.name = name; + this.hireDate = hireDate; + this.position = position; + } + + // Метод для получения имени + public string GetName() + { + return name; + } + + // Метод для установки имени + public void SetName(string name) + { + this.name = name; + } + + // Метод для получения даты приема на работу + public DateTime GetHireDate() + { + return hireDate; + } + + // Метод для установки даты приема на работу + public void SetHireDate(DateTime hireDate) + { + this.hireDate = hireDate; + } + + // Метод для получения должности + public string GetPosition() + { + return position; + } + + // Метод для установки должности + public void SetPosition(string position) + { + this.position = position; + } +} +public class Program +{ + public static void Main(string[] args) + { + Employee employee = new Employee("Иван Иванов", new DateTime(2020, 5, 1), "Менеджер"); + + Console.WriteLine($"Имя: {employee.GetName()}, Дата приема: {employee.GetHireDate().ToShortDateString()}, Должность: {employee.GetPosition()}"); + + employee.SetPosition("Старший менеджер"); + Console.WriteLine($"Обновленная должность: {employee.GetPosition()}"); + } +} From ef85817ccdcad84d720bf3db9b860bf13ff96c85 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Mon, 23 Dec 2024 21:32:23 +0300 Subject: [PATCH 4/8] LAB6Melikyan --- golang/LAB6/{LAB6.go.txt => LAB6.go} | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) rename golang/LAB6/{LAB6.go.txt => LAB6.go} (73%) diff --git a/golang/LAB6/LAB6.go.txt b/golang/LAB6/LAB6.go similarity index 73% rename from golang/LAB6/LAB6.go.txt rename to golang/LAB6/LAB6.go index 981262ae..8ff056b3 100644 --- a/golang/LAB6/LAB6.go.txt +++ b/golang/LAB6/LAB6.go @@ -2,12 +2,10 @@ using System; public struct Employee { - // Переменные private string name; private DateTime hireDate; private string position; - // Конструктор public Employee(string name, DateTime hireDate, string position) { this.name = name; @@ -15,37 +13,31 @@ public struct Employee this.position = position; } - // Метод для получения имени public string GetName() { return name; } - // Метод для установки имени public void SetName(string name) { this.name = name; } - // Метод для получения даты приема на работу public DateTime GetHireDate() { return hireDate; } - // Метод для установки даты приема на работу public void SetHireDate(DateTime hireDate) { this.hireDate = hireDate; } - // Метод для получения должности public string GetPosition() { return position; } - // Метод для установки должности public void SetPosition(string position) { this.position = position; @@ -62,4 +54,4 @@ public class Program employee.SetPosition("Старший менеджер"); Console.WriteLine($"Обновленная должность: {employee.GetPosition()}"); } -} +} \ No newline at end of file From 832a598051d063599cab2e418fb596c87c8a74a4 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Mon, 23 Dec 2024 22:22:38 +0300 Subject: [PATCH 5/8] LAB4Melikyan --- golang/LAB4/{LAB4.go.txt => LAB4.go} | 0 golang/main.go | 58 ++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) rename golang/LAB4/{LAB4.go.txt => LAB4.go} (100%) diff --git a/golang/LAB4/LAB4.go.txt b/golang/LAB4/LAB4.go similarity index 100% rename from golang/LAB4/LAB4.go.txt rename to golang/LAB4/LAB4.go diff --git a/golang/main.go b/golang/main.go index f5925a82..3f216dbf 100644 --- a/golang/main.go +++ b/golang/main.go @@ -32,4 +32,62 @@ import ( func main() { fmt.Println("Melikyan Samvel") laba4ab.Readylaba4ab() +} + +using System; + +public struct Employee +{ + private string name; + private DateTime hireDate; + private string position; + + public Employee(string name, DateTime hireDate, string position) + { + this.name = name; + this.hireDate = hireDate; + this.position = position; + } + + public string GetName() + { + return name; + } + + public void SetName(string name) + { + this.name = name; + } + + public DateTime GetHireDate() + { + return hireDate; + } + + public void SetHireDate(DateTime hireDate) + { + this.hireDate = hireDate; + } + + public string GetPosition() + { + return position; + } + + public void SetPosition(string position) + { + this.position = position; + } +} +public class Program +{ + public static void Main(string[] args) + { + Employee employee = new Employee("Иван Иванов", new DateTime(2020, 5, 1), "Менеджер"); + + Console.WriteLine($"Имя: {employee.GetName()}, Дата приема: {employee.GetHireDate().ToShortDateString()}, Должность: {employee.GetPosition()}"); + + employee.SetPosition("Старший менеджер"); + Console.WriteLine($"Обновленная должность: {employee.GetPosition()}"); + } } \ No newline at end of file From 028043ee2046aa1b03b414c4d3264796dfa90c4f Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Mon, 23 Dec 2024 23:23:07 +0300 Subject: [PATCH 6/8] Delete golang/LAB6/LAB6.go --- golang/LAB6/LAB6.go | 57 --------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 golang/LAB6/LAB6.go diff --git a/golang/LAB6/LAB6.go b/golang/LAB6/LAB6.go deleted file mode 100644 index 8ff056b3..00000000 --- a/golang/LAB6/LAB6.go +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -public struct Employee -{ - private string name; - private DateTime hireDate; - private string position; - - public Employee(string name, DateTime hireDate, string position) - { - this.name = name; - this.hireDate = hireDate; - this.position = position; - } - - public string GetName() - { - return name; - } - - public void SetName(string name) - { - this.name = name; - } - - public DateTime GetHireDate() - { - return hireDate; - } - - public void SetHireDate(DateTime hireDate) - { - this.hireDate = hireDate; - } - - public string GetPosition() - { - return position; - } - - public void SetPosition(string position) - { - this.position = position; - } -} -public class Program -{ - public static void Main(string[] args) - { - Employee employee = new Employee("Иван Иванов", new DateTime(2020, 5, 1), "Менеджер"); - - Console.WriteLine($"Имя: {employee.GetName()}, Дата приема: {employee.GetHireDate().ToShortDateString()}, Должность: {employee.GetPosition()}"); - - employee.SetPosition("Старший менеджер"); - Console.WriteLine($"Обновленная должность: {employee.GetPosition()}"); - } -} \ No newline at end of file From 220dda65871391b4a37168c257fe5b72ad3588e3 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Mon, 23 Dec 2024 23:50:51 +0300 Subject: [PATCH 7/8] LAB6Melikyan --- golang/LAB4/LAB4.go | 35 ------------------------- golang/LAB4/LAB4.go.txt | 0 golang/LAB6/LAB6.go | 57 ----------------------------------------- golang/LAB6/LAB6.go.txt | 0 4 files changed, 92 deletions(-) delete mode 100644 golang/LAB4/LAB4.go create mode 100644 golang/LAB4/LAB4.go.txt delete mode 100644 golang/LAB6/LAB6.go create mode 100644 golang/LAB6/LAB6.go.txt diff --git a/golang/LAB4/LAB4.go b/golang/LAB4/LAB4.go deleted file mode 100644 index 3ca58bf0..00000000 --- a/golang/LAB4/LAB4.go +++ /dev/null @@ -1,35 +0,0 @@ -package laba4ab - -import ( - "fmt" - "math" -) - -func Calculate(x, a float64) float64 { - y := math.Tan(math.Pow(math.Log10(a+x), 3)) / math.Pow((a+x), 2.0/7.0) - return y -} - -func CalculateB(xValues []float64, a float64) []float64 { - var spb = []float64{} - for _, x := range xValues { - spb = append(spb, Calculate(x, a)) - } - return spb -} - -func CalculateA(xn, xk, deltaX, a float64) []float64 { - var spa = []float64{} - for x := xn; x <= xk; x += deltaX { - spa = append(spa, Calculate(x, a)) - } - return spa -} - -func Readylaba4ab() { - fmt.Print("A\n") - fmt.Print(CalculateA(1.08, 1.88, 0.16, 2), "\n") - fmt.Print("B\n") - var xValues = []float64{1.16, 1.35, 1.48, 1.52, 1.96} - fmt.Print(CalculateB(xValues, 2.0)) -} \ No newline at end of file diff --git a/golang/LAB4/LAB4.go.txt b/golang/LAB4/LAB4.go.txt new file mode 100644 index 00000000..e69de29b diff --git a/golang/LAB6/LAB6.go b/golang/LAB6/LAB6.go deleted file mode 100644 index 8ff056b3..00000000 --- a/golang/LAB6/LAB6.go +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -public struct Employee -{ - private string name; - private DateTime hireDate; - private string position; - - public Employee(string name, DateTime hireDate, string position) - { - this.name = name; - this.hireDate = hireDate; - this.position = position; - } - - public string GetName() - { - return name; - } - - public void SetName(string name) - { - this.name = name; - } - - public DateTime GetHireDate() - { - return hireDate; - } - - public void SetHireDate(DateTime hireDate) - { - this.hireDate = hireDate; - } - - public string GetPosition() - { - return position; - } - - public void SetPosition(string position) - { - this.position = position; - } -} -public class Program -{ - public static void Main(string[] args) - { - Employee employee = new Employee("Иван Иванов", new DateTime(2020, 5, 1), "Менеджер"); - - Console.WriteLine($"Имя: {employee.GetName()}, Дата приема: {employee.GetHireDate().ToShortDateString()}, Должность: {employee.GetPosition()}"); - - employee.SetPosition("Старший менеджер"); - Console.WriteLine($"Обновленная должность: {employee.GetPosition()}"); - } -} \ No newline at end of file diff --git a/golang/LAB6/LAB6.go.txt b/golang/LAB6/LAB6.go.txt new file mode 100644 index 00000000..e69de29b From 2e87c175fa7513f197dc8158a6d374eaed922481 Mon Sep 17 00:00:00 2001 From: 4STO1337 Date: Tue, 24 Dec 2024 00:31:28 +0300 Subject: [PATCH 8/8] Delete golang/LAB6/LAB6.go.txt --- golang/LAB6/LAB6.go.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 golang/LAB6/LAB6.go.txt diff --git a/golang/LAB6/LAB6.go.txt b/golang/LAB6/LAB6.go.txt deleted file mode 100644 index e69de29b..00000000