“vá se mais” Respostas de código

vá se

func sqrt(x float64) string {
	if x < 0 {
		return sqrt(-x) + "i"
	}
	return fmt.Sprint(math.Sqrt(x))
}

func main() {
	fmt.Println(sqrt(2), sqrt(-4))
}
DevLorenzo

vá se mais

if num < 0 {
        fmt.Println(num, "is negative")
    } else if num < 10 {
        fmt.Println(num, "has 1 digit")
    } else {
        fmt.Println(num, "has multiple digits")
    }
}
Wide-eyed Fox

Golang, se mais

package main

import "fmt"

func main() {
	name := "Manager"
	if name == "Manager" {
		fmt.Println("This is the Manager")
	} else {
		fmt.Println("This is not the manager")
	}
}
Mid Tier

Respostas semelhantes a “vá se mais”

Perguntas semelhantes a “vá se mais”

Mais respostas relacionadas para “vá se mais” em Go

Procure respostas de código populares por idioma

Procurar outros idiomas de código