Skip to content

Instantly share code, notes, and snippets.

@xvbnm48
Created March 5, 2022 15:54
Show Gist options
  • Save xvbnm48/f3f5fcf5156b73964e5cc23f078477eb to your computer and use it in GitHub Desktop.
Save xvbnm48/f3f5fcf5156b73964e5cc23f078477eb to your computer and use it in GitHub Desktop.
function return vbalue
package main
import "fmt"
func main(){
JumlahLuas, jumlahKeliling := hitungReturnValue(30, 20)
fmt.Println("luas", JumlahLuas, "keliling", jumlahKeliling)
}
func hitungReturnValue(panjang, lebar int) (luas int, keliling int) {
luas = panjang * lebar
keliling = 2 * (panjang + lebar)
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment