Hipotenüs Hesapla - Microsoft Excel


İki kenarı verildiğinde hipotenüs hesabını yapan VBA kodudur.

Kod


Option Explicit

Function HipotenusHesapla(x, y)
    If (x > 0 And y > 0) Then
        HipotenusHesapla = Sqr(x ^ 2 + y ^ 2)
    End If
End Function

Etiketler
microsoft excel microsoft excel vba microsoft excel vba matematik işlemleri