xxxxxxxxxx
// Program to illustrate the use of Println() function
package main
import ("fmt")
// prints output in different lines
func main() {
currentSalary := 50000
fmt.Println("Hello")
fmt.Println("World!")
fmt.Println("Current Salary:", currentSalary)
}
xxxxxxxxxx
// Program to illustrate fmt.Print()
package main
// importing the fmt package
import ("fmt")
func main() {
fmt.Print("Hello, ")
fmt.Print("World!")
}
xxxxxxxxxx
// Program to illustrate Print() function
package main
import "fmt"
// prints output in same lines
func main() {
name := "Chandler Bing"
fmt.Print("Hello", name)
fmt.Print("Welcome to Go Programming")
}