Advertisement
Spocoman

05. Greeting by Name

Sep 12th, 2024 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.21 KB | None | 0 0
  1. package main
  2. import "fmt"
  3.  
  4. func main() {
  5.     var name string;
  6.     fmt.Scanln(&name)
  7.  
  8.     fmt.Println("Hello, " + name + "!")
  9.     // fmt.Print("Hello, ", name, "!\n")
  10.     // fmt.Printf("Hello, %s!\n", name)
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement