Values
// Package declaration - Every Go program starts with a package declaration.
package main
// Importing the "fmt" package - It provides functions for formatting and printing.
import "fmt"
// The main function - It is the entry point of the program.
func main() {
// Print the concatenated string "go" + "lang"
fmt.Println("go" + "lang")
// Print the result of the arithmetic operation 1+1
fmt.Println("1+1 =", 1+1)
// Print the result of the arithmetic operation 7.0/3.0
fmt.Println("7.0/3.0 =", 7.0/3.0)
// Print the result of the boolean operation true && false (logical AND)
fmt.Println(true && false)
// Print the result of the boolean operation true || false (logical OR)
fmt.Println(true || false)
// Print the result of the boolean operation !true (logical NOT)
fmt.Println(!true)
}Output
Last updated