C hipotēka () - C standarta bibliotēka

Satura rādītājs

Hipotenūza ir taisnleņķa trīsstūra garākā puse. Hipotēnas () funkcija tiek izmantota, lai atrastu hipotenūzu, ja tiek nodrošinātas citas divas puses.

hipot () funkcija Prototips

 dubultā hipota (dubultā p, dubultā b);

h = √(p2+b2)matemātikā ir līdzvērtīgs h = hypot(p, b);C programmēšanai.

Funkcija Hipotēka () ir definēta galvenes failā "> math.h.

Piemērs: C hipotēka () Funkcija

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

Rezultāts

 hipotēka (5.00, 12.00) = 13.00

Interesanti raksti...