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 JAVA (judge verdict: Wrong Answer)

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;

/**
 * Lesson10B 三角形の２辺 a, b とその間の角 C から、
 * その三角形の面積 S、周の長さ L, a を底辺としたときの高さ h を求めるプログラム
 * @author Internship
 *
 */
public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		// 1行目を取得
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			// 分解
			String[] strAryLine1 = strLine.split(" ");

			// intにキャスト
			// Aの値
			double dbA = Double.parseDouble(strAryLine1[0]);

			// Bの値
			double dbB = Double.parseDouble(strAryLine1[1]);

			// 角度
			int intAngle = Integer.parseInt(strAryLine1[2]);

			//面積S
			double dbAreaS = 0.0;

			//周囲L
			double dbSurroundingsL = 0.0;

			//高さH
			double dbHeight = 0.0;

			// 計算

			//sin値
			double dbSin = Math.sin(Math.toRadians(intAngle));

			dbAreaS = dbA * dbB / 2 * dbSin;

			double dbAnswer = (dbA * dbA) + (dbB * dbB);

			dbAnswer = Math.sqrt(dbAnswer);

			dbSurroundingsL = dbA + dbB + (dbAnswer);

			dbHeight = dbAreaS / dbA * 2;

			 //小数8桁まで
			DecimalFormat insdf = new DecimalFormat("0.00000000");

			//結果を出力 double型は小数8桁まで表示
			System.out.println(insdf.format(dbAreaS));

			System.out.println(insdf.format(dbSurroundingsL));

			System.out.println(insdf.format(dbHeight));

		} catch (IOException e) {
			System.out.println(e);
		} catch (NumberFormatException e) {
			System.out.println("数字で入力して下さい");
		}
	}
}