473,434 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

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?
Sep 12 '10 #1
1 2014
donbock
2,426 Expert 2GB
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

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

Similar topics

12
by: deanfamily11 | last post by:
Now, I've made a program that when the user enters 3 numbers, it is supposed to tell the user if it is a right triangle by using the quadratic equation (a^2 + b^2 = c^2). Now, granted it can be...
2
by: Mad Scientist Jr | last post by:
I am editing an existing application that has a System.Windows.Forms.TreeView with a right-click menu with several options. I want to get rid of the TreeView alltogether and rip out the code for...
0
by: Chris | last post by:
I am getting a bit confused again with theis com+ stuff. I am looking at the PetShop app and I see the layers BLL DAL. Do these layers have to be on the same web server? If they are on separate...
12
by: asif929 | last post by:
I am trying to write a program which creates four triangles. The program begins with prompting a user " Enter the size of triangles", number from 1 to N is the size of four triangles For Example if...
16
by: simpleeshelbee | last post by:
Hey all, This is my first post. I am really hoping that someone out there has a solution to my C++ coding problem... This is my code and what I have to do... I think it is rows of 1 - 10 and...
0
by: simpleeshelbee | last post by:
When I went back and looked at what came out to see for my message, I saw that it came out a little different than I need it. I need it like this.... * = asterisks 1st row = 1 *, 9 spaces, 10...
1
by: lazooo | last post by:
I have the two following questions: 1. When you write the code you can do it in two different ways. You can write all the code directly in your gameloop or you can break it down in small functions...
11
by: inferi9 | last post by:
hi everyone I am new here and I have this C++ program that I have to write but it keep given me nothing useful. here is the question: A right triangle can have sides that are all integers. A...
4
by: =?Utf-8?B?cmF5ZnVzaW9u?= | last post by:
I am storing Keys.Right in a string and I need to convert it to back to the Keys Enumeration so I can handle it correctly. How do I do this?
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.