111

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 19 17:48:35 PST 2016


On 02/19/2016 03:56 PM, Lisa wrote:
> Can you please help me and explain how to create a program, which would
> find area of triangle and its perimeter?

It's great to have student questions on this forum. If you don't mind 
telling us, which teacher and school teaches or uses D? The only one 
that I know of is Professor Chuck Allison at Utah Valley University.

Assuming that you are given the lengths of the three sides, you can 
calculate the area with Heron's formula. I had used that method in this 
otherwise unrelated chapter:

   http://ddili.org/ders/d.en/invariant.html

Ali



More information about the Digitalmars-d-learn mailing list