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.IO;
using System.Linq;
using System.Collections.Generic;

public class Program
{

    public void Proc()
    {
        int[] inpt = Reader.ReadLine().Split(' ').Select(t => int.Parse(t)).ToArray();
        int a = inpt[0];
        int b = inpt[1];
        int kaku = inpt[2];
        double rad = kaku * (Math.PI / 180);
        double menseki = 0;
		double gaisyu = 0;
        double takasa = b * Math.Sin(rad);
        menseki = a * takasa / 2;
        gaisyu = a + b + Math.Sqrt(Math.Pow(a, 2) + Math.Pow(b, 2) - (a * b * Math.Cos(rad)*2));
        Console.WriteLine(menseki);
        Console.WriteLine(gaisyu);
        Console.WriteLine(takasa);
    }


    public class Reader
	{
		private static StringReader sr;
		public static bool IsDebug = false;
		public static string ReadLine()
		{
			if (IsDebug)
			{
				if (sr == null)
				{
					sr = new StringReader(InputText.Trim());
				}
				return sr.ReadLine();
			}
			else
			{
				return Console.ReadLine();
			}
		}
		private static string InputText = @"






100 80 54



";
	}

	public static void Main(string[] args)
	{
#if DEBUG
		Reader.IsDebug = true;
#endif
		Program prg = new Program();
		prg.Proc();
	}
}