Republic Gadget, Windows Phone, Asansam box Version, Z3X BOX Samsung, How to Backup, iPhone 7 to PC/Mac, Korea Telecom

C# Program to find Area of Triangle

C# Program to find Area of Triangle - the world of technology is more advanced, we should be technically literate so as not left behind by others, in blogs Republic Gadget we will present updated information about technological developments, product reviews from various brands, now we will discuss first about this information C# Program to find Area of Triangle we cover directly from reliable sources, 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);
}
}




so much information C# Program to find Area of Triangle

hopefully the infromation that we show for you about C# Program to find Area of Triangle can provide the latest knowledge about the gadgets you need in everyday life.

you've just read the article with the title C# Program to find Area of Triangle if you intend to bookmark or share it for many people please use the link https://bhrepublicadominicana.blogspot.com/2014/02/c-program-to-find-area-of-triangle.html still a lot of information on this blog, please visit other pages.

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

Related : C# Program to find Area of Triangle

0 komentar:

Post a Comment