9951 explained code solutions for 126 technologies


golangHow to print boolean with printf()


package main
import "fmt"

func main() {
  fmt.Printf("%t", true)
}ctrl + c
func main() {

declare main function that will be launched automatically

package main

default package declaration

fmt.Printf(

prints formatted string

%t

will print true or false depending on input value

true

sample boolean value