# I was asked to do this in class

How do I write a program that will find the altitude of an isosceles triangle whose vertex angle is 38 degrees and whose equal sides are 7.9 meters long
LVL 4
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
The formula is :

altitude = side * cos(angle / 2)

altitude = 7.9 * cos(38 / 2) = 7.9 * cos(19) = 7.4696

assuming that by vertex angle you meant the angle at the tip of the triangle (between the two equal sides).
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
I'll let you write the code for that ;) Give it a try, and post your result here ...
0
Author Commented:
Thanks
0
Author Commented:
I don't know if this works I am asking this on behalf of someone but they will have to figure out the rest.
0
Commented:
>> I don't know if this works

I know ;)

May I ask why you gave a B grade ? That usually means that something was missing in the answer. If so, you can always ask for clarification - you don't have to accept an answer if you're not entirely happy with it yet.
0
Author Commented:
I am sorry, I didn't mean to offend you in any way and if I did I am very sorry.  Usually though I give an "A" for a significant issue that was resolved. I offered the maximum points on an issue as an appreciation for the resolution. But the grade usually say how I feel about the issue that was resolved.
0
Commented:
The points should reflect how difficult/important a question is.

How many points should I assign to a question ? : http://www.experts-exchange.com/help.jsp#hi102
What's the right grade to give ? : http://www.experts-exchange.com/help.jsp#hi97

>> I am sorry, I didn't mean to offend you in any way and if I did I am very sorry.

I don't easily get offended ;) I was merely asking about the grade because maybe I could have done better with my answer, and if so, I want to know how, so I can become better at answering questions to the satisfaction of the askers :)
0
Author Commented:
I didn't want to sound petty, but maybe your second response played a small role.
0
Commented:
>> but maybe your second response played a small role.

The reason for that second reply is that on this site, we're not allowed to solve assignments for askers. We're only allowed to answer specific questions, give hints in the right direction, etc. ... But the real work has to be done by the asker. We will however guide the asker until the end if needed.
0
Author Commented:
I have never asked for help in the C++ section before. Quite frankly you guys are too smart for me. I work with VB and C#. I have a few open questions over there. In essence I am challenging your comment "We will however guide the asker until the end if needed." My experience here with C++ questions has being excellent. I am batting a thousand. But I have 1500 points up for grabs and a few that were deleted.
0
Commented:
I'm not an expert in any of the other zones you mentioned ;)
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.