Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // funcoes funcoes.go
- package main
- import "fmt"
- func somar(a int, b int) int {
- return a + b
- }
- func imprimir(valor int) {
- fmt.Println(valor)
- }
- // main.go
- // To run this code "go run *.go"
- func main() {
- resultado := somar(3, 4)
- imprimir(resultado)
- }
Advertisement
Add Comment
Please, Sign In to add comment