İki kenarı verildiğinde hipotenüs hesabını yapan VBA kodudur.
Option Explicit Function HipotenusHesapla(x, y) If (x > 0 And y > 0) Then HipotenusHesapla = Sqr(x ^ 2 + y ^ 2) End If End Function