Test All Gadget, Z3X BOX Samsung, Miracle Box, Smart Phone Flash Tool, Stock ROMs, Android Tool, apps, Data Plans Internet

Kamis, 06 Februari 2014

C# Program to find Area of Triangle

C# Program to find Area of Triangle - discussing about technology is my hobby, with media blogs Test All Gadget we can share the knowledge of technology that continues to grow with various ways of use that is intended to simplify your life, now we will discuss first about that in your search that is C# Program to find Area of Triangle please refer to our explanation because we will try to make a complete article for you.

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);
}
}




enough already articles C# Program to find Area of Triangle

hopefully the information C# Program to find Area of Triangle that we submit on this blog can be useful for your life and all the people who visit this blog.

you just finished reading the article with the title C# Program to find Area of Triangle if you intend to bookmark or shre please use the link https://testallforone.blogspot.com/2014/02/c-program-to-find-area-of-triangle.html and do not visit other pages on this blog because it still sangant a lot of information about gadgets from the old to the latest.

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

Related : C# Program to find Area of Triangle

5 komentar:

  1. You best career option in because very big scope in india digimanthan . marketing now many peoples are promoting his business online ,100% job placement in digital marketing .
    digital marketing course in janakpuri
    digital marketing course in dwarka
    digital marketing course in rajouri garden

    BalasHapus
  2. This is the best blog and thanks for shareing the knowledge.

    click on the link for find best digital marketing institute in patna
    best-digital-marketing-company-in-patna

    BalasHapus

  3. 1croreprojects offers the best
    final year mba projects chennai
    for final year students

    BalasHapus