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

include Math
require 'bigdecimal'
def calc_area(a, b, sin_c)
  s = a * b * sin_c * 0.5
  return s #????§???????
end

def calc_length(a, b, sin_c)
  c = a * sin_c
  l = a + b + c
  return l #????§???????
end

def calc_height(a, b, sin_c)
  h = b * sin_c
  return h #?????????a
end

input_values = gets.chomp.split.map(&:to_i)
a = input_values[0]
b = input_values[1]
c = input_values[2]
if c == 90 || c == 270
  sin_c = 1
elsif c == 180 || c == 0
  sin_c = 0
else
sin_c = BigDecimal(sin(c).to_s).floor(6).to_f
end
puts calc_area(a, b, sin_c)
puts calc_length(a, b, sin_c)
puts calc_height(a, b, sin_c)