good course by Kirill
This commit is contained in:
parent
28109f35f6
commit
5ae2318fb9
3
Lec4/go.mod
Normal file
3
Lec4/go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module main.go
|
||||
|
||||
go 1.24.4
|
||||
15
Lec4/main.go
Normal file
15
Lec4/main.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unicode/utf8"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
|
||||
func main() {
|
||||
var kek string = "Федя"
|
||||
fmt.Printf("Length of %s is: %d\n",kek,len(kek))
|
||||
fmt.Printf("Length in chars: %d\n",utf8.RuneCountInString(kek))
|
||||
fmt.Printf("Type %T size of %d bytes\n",kek,unsafe.Sizeof(kek))
|
||||
}
|
||||
3
Lec5/go.mod
Normal file
3
Lec5/go.mod
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module main.go
|
||||
|
||||
go 1.24.4
|
||||
17
Lec5/main.go
Normal file
17
Lec5/main.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
func main() {
|
||||
var word1 string
|
||||
fmt.Scan(&word1)
|
||||
if strings.Contains(word1,"чат") {
|
||||
fmt.Println("THIS IS BOT")
|
||||
return
|
||||
}
|
||||
fmt.Println("This is not a bot")
|
||||
}
|
||||
0
pkg/mod/cache/lock
vendored
Normal file
0
pkg/mod/cache/lock
vendored
Normal file
Loading…
Reference in New Issue
Block a user