From 59dfe50ae8cd5eb543d486baef7a713a15954880 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Jun 2026 00:36:16 +0300 Subject: [PATCH] add new go file go/l2.go for one math operation --- go/l2.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 go/l2.go diff --git a/go/l2.go b/go/l2.go new file mode 100644 index 0000000..49bb41b --- /dev/null +++ b/go/l2.go @@ -0,0 +1,26 @@ +package main +import ( + "fmt" +) +func polz() { + fmt.Println("Первое число ") + var x1 int + fmt.Scan(&x1) + fmt.Println("Второе число ") + var x2 int + fmt.Scan(&x2) + x3 := x1+x2 + fmt.Println(x1 , "+" , x2 , "=" , x3) +} +func main() { + for { + fmt.Println("1. Начать\n2. Закончить") + var choise int + fmt.Scan(&choise) + if choise == 1 { + polz() + } else if choise == 2 { + return + } + } +}