How to calculate c, which is the quarter of the hypotenuse of a right triangle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John Jones
    New Member
    • Sep 2010
    • 1

    How to calculate c, which is the quarter of the hypotenuse of a right triangle

    I need to calculate c, which is a quarter of the hypotenuse of a right triangle with side lengths of a and b. How can i express the formula for c using math.h?
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    You should start with a function that has two input arguments (a and b) and that returns c. Initially, your main function should pass hard-coded argument values so you can focus on debugging the function. Later, if necessary, you can modify main to obtain argument values interactively.

    @John Jones: Please post the mathematical formula you wish to implement in the C program.

    Comment

    Working...