Problem:
Triangle

For given two sides of a triangle a and b and the angle C between them, calculate the following properties:

S: Area of the triangle

L: The length of the circumference of the triangle

h: The height of the triangle with side a as a bottom edge

Input

The length of a, the length of b and the angle C are given in integers.

Output

Print S, L and h in a line respectively. The output should not contain an absolute error greater than 10-4.

Sample Input

4 3 90

Sample Output

6.00000000
12.00000000
3.00000000

Solution in C# (judge verdict: Wrong Answer)

using System;
using System.Linq;
namespace ITP1_10_B
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Math.Sin(Math.PI / 6.0));
            int[] input = Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();

            double rad = input[2] / 180.0 * Math.PI;

            double[] a = new double[] { input[0], 0 };
            double[] b = new double[] { Math.Cos(rad) * input[1], Math.Sin(rad) * input[1] };

            double S = input[0] * input[1] * Math.Sin(rad) * 0.5;
            double distance = Math.Sqrt(Math.Pow((b[0] - a[0]), 2) + Math.Pow((b[1] - a[1]), 2));
            double L = input[0] + input[1] + distance;
            double h = input[1] * ToHalfAdjust(Math.Sin(rad), 5);
    
            Console.WriteLine(S);
            Console.WriteLine(L);
            Console.WriteLine(h);
        }
        public static double ToHalfAdjust(double dValue, int iDigits)
        {
            double dCoef = Math.Pow(10, iDigits);
            return Math.Floor((dValue * dCoef) + 0.5) / dCoef ;
        }
    }
}