C hüpott () - C standardraamatukogu

Lang L: none (table-of-contents)

Hüpotenuus on täisnurga kolmnurga pikim külg. Hüpoteni () funktsiooni kasutatakse hüpotenuusi leidmiseks, kui on ette nähtud teised kaks külge.

hüpoti () funktsioon Prototüüp

 topelthüpot (topelt p, topelt b);

h = √(p2+b2)matemaatikas on samaväärne h = hypot(p, b);C-programmeerimisega.

Funktsioon hüpot () on määratletud päisefailis "> math.h.

Näide: C hypot () Funktsioon

 #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; )

Väljund

 hüpot (5.00, 12.00) = 13.00

Huvitavad Artiklid...