TelenkovDmitry 1 anno fa
parent
commit
9fe08a0fb7
3 ha cambiato i file con 20 aggiunte e 2 eliminazioni
  1. BIN
      courses/cpp_1/hello_world.exe
  2. 1 1
      go/go.mod
  3. 19 1
      go/test.go

BIN
courses/cpp_1/hello_world.exe


+ 1 - 1
go/go.mod

@@ -1,3 +1,3 @@
 module hello
 module hello
 
 
-go 1.19
+go 1.21.5

+ 19 - 1
go/test.go

@@ -3,5 +3,23 @@ package main
 import "fmt"
 import "fmt"
 
 
 func main() {
 func main() {
-	fmt.Printf("First go example\n")
+	// fmt.Printf("I like Go!\r\n")
+	multiple()
+}
+
+func input_age() {
+	var name string
+	var age int
+	fmt.Print("Введите имя: ")
+	fmt.Scan(&name)
+	fmt.Print("Введите возраст: ")
+	fmt.Scan(&age)
+
+	fmt.Println(name, age)
+}
+
+func multiple() {
+	var number int
+	fmt.Scan(&number)
+	fmt.Println(number*2 + 100)
 }
 }