Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/String-concatenation/Go/string-concatenation.go
Normal file
21
Task/String-concatenation/Go/string-concatenation.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
// text assigned to a string variable
|
||||
s := "hello"
|
||||
|
||||
// output string variable
|
||||
fmt.Println(s)
|
||||
|
||||
// this output requested by original task descrption, although
|
||||
// not really required by current wording of task description.
|
||||
fmt.Println(s + " literal")
|
||||
|
||||
// concatenate variable and literal, assign result to another string variable
|
||||
s2 := s + " literal"
|
||||
|
||||
// output second string variable
|
||||
fmt.Println(s2)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue