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: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Threading.Tasks;

namespace Triangle
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ');
            double[] ngo = new double[3];
            for (int i = 0; i < 3; ++i) ngo[i] = double.Parse(input[i]);
            ngo[2] = Math.PI * ngo[2] / 180;
            double s = ngo[0] * ngo[1] * Math.Sin(ngo[2]) / 2.0;
            double l = ngo[0] + ngo[1] + Math.Sqrt(Math.Pow(ngo[0], 2) + Math.Pow(ngo[1], 2) - 2 * ngo[0] * ngo[1] * Math.Cos(ngo[2]));
            double h = ngo[1] * Math.Sin(ngo[2]);
            Console.WriteLine(s);
            Console.WriteLine(l);
            Console.WriteLine(h);
        }
    }
}