Interactive Greeting

Wait for user input with fmt.Scanln().

package main

import "fmt"

func main() {
	fmt.Println("Welcome!")
	fmt.Println("Press Enter to continue...")
	fmt.Scanln()
	fmt.Println("Let's go!")
}

💻 Run locally

Copy the code above and run it on your machine

© 2026 ByteLearn.dev. Free courses for developers. · Privacy