Skip to content

Commit

Permalink
14.1- funcoes com retorno nomeado
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruteski committed Mar 27, 2024
1 parent b6b7f71 commit 42c433d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions 14-funcoes_avacadas/14.1-retorno_nomeado/retono_nomeado.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import "fmt"

func calculosMatematicos(n1, n2 int) (soma int, subtracao int) {
soma = n1 + n2
subtracao = n1 - n2
return
}

func main() {
soma, subtracao := calculosMatematicos(10, 20)
fmt.Println(soma, subtracao)
}

0 comments on commit 42c433d

Please sign in to comment.