C# program to find Area of Scalene Triangle
Program
using System;
namespace AreaOfScaleneTriangle
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter the Side 1:\t");
float sideOne = float.Parse(Console.ReadLine());
Console.Write("Enter the Side 2:\t");
float sideTwo = float.Parse(Console.ReadLine());
Console.Write("Enter the Angle:\t");
float angle = float.Parse(Console.ReadLine());
float area = (float)(sideOne * sideTwo * Math.Sin((Math.PI / 180) * angle)) / 2;
Console.WriteLine("Area of scalene triangle:\t" + area);
}
}
}
Output
Enter the Side 1: 15
Enter the Side 2: 8
Enter the Angle: 45
Area of scalene triangle: 42.42641