GoLang
xxxxxxxxxx
package main
import (
"fmt"
"os"
)
type point struct {
x, y int
}
func main() {
p := point{1, 2}
fmt.Printf("%v\n", p)
fmt.Printf("%+v\n", p)
fmt.Printf("%#v\n", p)
fmt.Printf("%T\n", p)
fmt.Printf("%t\n", true)
fmt.Printf("%d\n", 123)
fmt.Printf("%b\n", 14)
fmt.Printf("%c\n", 33)
fmt.Printf("%x\n", 456)
fmt.Printf("%f\n", 78.9)
fmt.Printf("%e\n", 123400000.0)
fmt.Printf("%E\n", 123400000.0)
fmt.Printf("%s\n", "\"string\"")
fmt.Printf("%q\n", "\"string\"")
fmt.Printf("%x\n", "hex this")
fmt.Printf("%p\n", &p)
fmt.Printf("|%6d|%6d|\n", 12, 345)
fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45)
fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45)
fmt.Printf("|%6s|%6s|\n", "foo", "b")
fmt.Printf("|%-6s|%-6s|\n", "foo", "b")
s := fmt.Sprintf("a %s", "string")
fmt.Println(s)
fmt.Fprintf(os.Stderr, "an %s\n", "error")
}
{1 2} {x:1 y:2} main.point{x:1, y:2} main.point true 123 1110 ! 1c8 78.900000 1.234000e+08 1.234000E+08 "string" "\"string\"" 6865782074686973 0x42135100 | 12| 345| | 1.20| 3.45| |1.20 |3.45 | | foo| b| |foo |b | a string an error
C - Dinamik xotira ajratish yordamida eng katta raqamni toping
Linux - anc-api-tools qanday o'rnatiladi
Kotlin - Sonning faktorialini toping
Java - Ikki massivni birlashtirish
Java - Raqamni teskari aylantirish
Python - Lug'atni qiymat bo'yicha qanday saralashim mumkin?
JavaScript - Satrdagi unlilar sonini hisoblang
Linux - zlib1g-dev qanday o'rnatiladi
C++ - Raqam tub yoki oddiy emasligini tekshiring
PHP - Qiymat bo'yicha o'sish tartibida assotsiativ massiv
Linux - curvedns qanday o'rnatiladi
Kotlin - Joriy sana/vaqtni oling
Kotlin - Raqam juft yoki toq ekanligini tekshiring
Java - Piramida va naqsh yarating
Kotlin - Raqamning kuchini hisoblang
Kotlin - Ikkita suzuvchi nuqta sonini ko'paytiring
Kotlin - Natural sonlar yig‘indisini hisoblang
C++ - Ikkilik sonni oʻnlik songa va aksincha oʻzgartiring
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month