addition example

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

View File

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

View File

@ -18,4 +18,5 @@ func main() {
arrays.Demo4()
slices.Demo2()
functions.SayHello()
functions.Addition(2,6)
}