By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,745 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,745 IT Pros & Developers. It's quick & easy.

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

P: 1
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?
Sep 12 '10 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 2,398
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.
Sep 12 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.