another addition example

This commit is contained in:
Mert Gör 🇹🇷 2024-01-14 00:26:50 +03:00
parent 26adaad561
commit 71468385e2
Signed by: hwpplayer1
GPG key ID: 03E547D043AB6C8F
2 changed files with 4 additions and 2 deletions

View file

@ -2,9 +2,9 @@ package functions
import "fmt"
func Addition(number1 int, number2 int) {
func Addition(number1 int, number2 int) int{
var total = number1 + number2
fmt.Println("Result : ", total)
return total
}
func SayHello() {

View file

@ -19,4 +19,6 @@ func main() {
slices.Demo2()
functions.SayHello()
functions.Addition(2,6)
var total = functions.Addition(3,8)
fmt.Println(total)
}