Exemple #1
0
func main() {
	fmt.Printf(stringutil.Reverse("\nHello, world!\n"))
	fmt.Println("The time is:", time.Now())
	fmt.Println("My favorite number is:", rand.Intn(100))
	fmt.Printf("Now you get %g problems. and the value of PI is: %g.\n", math.Sqrt(7), math.Pi)
	fmt.Println("23 + 45 = ", add(23, 45))

	//a, b := swap("world", "hello")
	//fmt.Println(a, b)

	fmt.Println(split(17))

	var c, python, java = false, false, "No!"
	k := 3
	fmt.Println(c, java, python, n, m, k)

	//const f = "%T(%v)\n"
	//fmt.Printf(f, ToBe, ToBe)
	//fmt.Printf(f, MaxInt, MaxInt)
	//fmt.Printf(f, z, z)

	//var i int
	//var f float64
	//var b bool
	//var s string
	//fmt.Printf("%v %v %v %q\n", i, f, b, s)

	var x, y int = 3, 4
	var f float64 = math.Sqrt(float64(x*x + y*y))
	var z uint = uint(f)
	fmt.Printf("%v %v %v %v\n", x, y, f, z)

	v := 42
	fmt.Printf("v is type of %T\n", v)
}
Exemple #2
0
func main() {
	fmt.Printf(stringutil.Reverse("hello, world\n"))
}
Exemple #3
0
func main() {
	fmt.Println(stringutil.Reverse("Hello, world."))
}
Exemple #4
0
func main() {
	fmt.Printf(stringutil.Reverse("\n¡Hola Mundo Git!"))
}
Exemple #5
0
func main() {
	fmt.Printf(stringutil.Reverse("!oG ,olleH"))
}
Exemple #6
0
func main() {
	fmt.Printf("hello, world\n")
	fmt.Printf(stringutil.Reverse("\n!oG ,olleH"))
	log.Fatal("Fatal")
}
func main() {
	//fmt.Printf("Hello, world,\n")
	fmt.Printf(stringutil.Reverse("!oG ,olleH"))
}
Exemple #8
0
func main() {
	fmt.Printf(stringutil.Reverse("\nHell World!\n"))
}