Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
how to find area of a triangle when its three sides are given using dot net
Posted

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.
 
Share this answer
 
Comments
_Amy 3-Oct-12 9:44am    
It is giving even more than that. +5! :)
fjdiewornncalwe 3-Oct-12 9:51am    
Thanks...
You should try this:
C#
//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));
}




--Amit
 
Share this answer
 
Comments
fjdiewornncalwe 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900