Hipotenüs, dik üçgenin en uzun kenarıdır. Hypot () işlevi, diğer iki taraf sağlandığında hipotenüs bulmak için kullanılır.
hypot () işlevi Prototip
çift hipot (çift p, çift b);
h = √(p2+b2)
Matematikte h = hypot(p, b);
C Programlama ile eşdeğerdir .
Hypot () işlevi "> math.h başlık dosyasında tanımlanmıştır.
Örnek: C hypot () Fonksiyonu
#include #include int main() ( double p, b; double hypotenuse; p = 5.0; b = 12.0; hypotenuse = hypot(p, b); printf("hypot(%.2lf, %.2lf) = %.2lf", p, b, hypotenuse); return 0; )
Çıktı
hipot (5,00, 12,00) = 13,00