Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: .NET
how to find area of a triangle when its three sides are given using dot net
Posted 3-Oct-12 4:30am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

25.9 million results. Wow.... GOOGLE[^] is your friend and you should visit him often. What you need to do is find a link in the list I've provided which gives you the algorithm and then convert that into the code language of your choice. Happy hunting.
_Amy at 3-Oct-12 9:44am
It is giving even more than that. +5! :)
Marcus Kramer at 3-Oct-12 9:51am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You should try this:
//Suppose your three sides are a, b & c
private double area(double a, double b, double c){
    double s = (a + b + c) / 2;
    return Math.Sqrt(s * (s - a) * (s - b) * (s - c));

Marcus Kramer at 3-Oct-12 9:51am
Please don't just provide a code solution to someone asking a blatant homework question. What will the OP learn from that. What we want to do is show them how to figure out the answer. By just giving them something to copy/paste they are not learning anything. (I haven't voted on your answer as it is correct)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 434
1 Maciej Los 430
2 OriginalGriff 315
3 CHill60 240
4 Abhinav S 220
0 Sergey Alexandrovich Kryukov 10,102
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 3 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100