Tech News Today, Marshmallow Custom Rom, Huawei, Run Programs, Network, Chromebook, Bank Account

Kamis, 06 Februari 2014

C# Program to find Area of Triangle

C# Program to find Area of Triangle - To all visitors of this blog, I say welcome and thank you for visiting the blog Tech News Today Look for all the things you need that are available on this blog. If not available, please leave suggestions and comments for the development of this blog. now we will discuss first about C# Program to find Area of Triangle we have collected a lot of information from sources to create this article, so please see.

Articles : C# Program to find Area of Triangle
full Link : C# Program to find Area of Triangle
Article Csharp, Article programs,

You can also see our article on:


C# Program to find Area of Triangle

C# Program to find Area of Triangle

Program Statement:
If the lengths of the sides of a triangle are denoted by a, b, and c, then area of triangle is given by
Area = SS(S-a)(S-b)(S-c)
where, S = ( a + b + c ) / 2

Solution:
 class sq
{
int a, b, c;
double S, Area, temp2;
public double s(double t)
{
double lb = 0, ub = t, temp = 0; int count = 50;
while (count != 0)
{
temp = (lb + ub) / 2;
if (temp * temp == t)
{ return temp; }
else if (temp * temp > t)
{ ub = temp; }
else
{ lb = temp; }
count--;
}
return temp;
}
public void cal()
{
Console.Write("\n\t\tEnter value of a : ");
a = Convert.ToInt32(Console.ReadLine());
Console.Write("\n\t\tEnter value of b : ");
b = Convert.ToInt32(Console.ReadLine());
Console.Write("\n\t\tEnter value of c : ");
c = Convert.ToInt32(Console.ReadLine());
S = (a + b + c) / 2;
temp2 = (S * (S - a) * (S - b) * (S - c));
Area = S * s(temp2);
Console.WriteLine("\n\t\tArea = {0}\n\n", Area);
}
}




information C# Program to find Area of Triangle has been completed in the discussion.

hopefully the article we give the title C# Program to find Area of Triangle can provide knowledge for you in living everyday life in determining the gadget that suits your needs.

you just read the article about C# Program to find Area of Triangle if this article is useful for you and want to bookmark it or share it please use the link http://sihanandi.blogspot.com/2014/02/c-program-to-find-area-of-triangle.html thank you and do not forget to comment if anyone.

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : C# Program to find Area of Triangle

0 komentar:

Posting Komentar