Created
May 3, 2014 06:49
-
-
Save kimitoboku/11492842 to your computer and use it in GitHub Desktop.
A Tour of Go#10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func split(sum int) (x,y int){ | |
x = sum % 10 | |
y = sum - x | |
return | |
} | |
func main(){ | |
fmt.Println(split(18)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment