New C# Program to find Area of Triangle

New C# Program to find Area of Triangle - lately we often hear a lot of new gadgets are released by famous brands that have a good spec, on the blog Anisa Gadget we will discuss about the review gagdet of all brands ranging from spek, price and how to use it, now we will discuss first about New C# Program to find Area of Triangle please refer to the information we provide, because we have collected a lot of data to make this article to be complete for you:

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

You can also see our article on:


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




quite so many infromation New C# Program to find Area of Triangle

hopefully the information we provide about New C# Program to find Area of Triangle can give more benefits for you in determining the gadget that suits your needs.

you just read the article with the title New C# Program to find Area of Triangle if intend to bookmark bookmark or share please use link https://anisapunyablog.blogspot.com/2014/02/new-c-program-to-find-area-of-triangle.html to get more information about technology please visit other pages on this blog, thank you.

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

Related : New C# Program to find Area of Triangle

  • New C# Program to Print TrianglesC# Program to Print TrianglesProgram Statement:Write a program to produce the following output:A B C D E F G F E D C B AA B C D E F     F E D C B AA B C D E &n ...
  • New C# Program to Print Fibonacci seriesC# Program to Print Fibonacci seriesProgram Statement:Write a program which prints the Fibonacci series using loop.1 1 2 3 5 8 13 21 34 …Solution: public class _fib { ...
  • New Program to Print Armstrong numbers in C#C# Program to Print out all Armstrong numbers between 1 and 500Program Statement:Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of ...
  • New Array Problem Solving using C#Array Problem Solving using C#Program Statement:Create two arrays student_rollno and student_marks, both of same size. First array will save the rollnos of students and ...
  • New C# Program to display the different series output on the screenC# Program to display the different series output on the screenProgram Statement:Write a program which display the following output on the screen.1 2 3 4 51 4 9 16 251 8 ...

0 komentar:

Posting Komentar