#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int cos(double);
int /*<<< orphan*/ printf(char *, double, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
double sin(double);
double sqrt(double);
int main() {
  const double pi = 3.1415926;
  double a, b, c, C, S, L, h;
  scanf("%lf%lf%lf", &a, &b, &C);
  C *= pi / 180;
  c = sqrt(a * a + b * b - 2 * a * b * cos(C));
  S = a * b * sin(C) / 2;
  L = a + b + c;
  h = 2 * S / a;
  printf("%.13lf\n%.13lf\n%.13lf\n", S, L, h);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xea9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xea5(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x30(%rbp),%rcx
call   1050 <scanf@plt>
movsd  0xe7c(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe41(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1060 <cos@plt>
movsd  -0x60(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xdc4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xd9f(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
lea    0xd9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xebd(%rip),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x18(%rsp),%xmm0
mulsd  0xe83(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x28(%rsp),%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  0x20(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm1,%xmm1
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
call   1060 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  0xe41(%rip),%xmm1
mulsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     11eb <main+0x9b>
sqrtsd %xmm0,%xmm0
jmp    11f0 <main+0xa0>
call   1070 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xdef(%rip),%xmm0
movsd  0x28(%rsp),%xmm3
movsd  0x20(%rsp),%xmm1
addsd  %xmm3,%xmm1
addsd  0x8(%rsp),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm0,%xmm2
divsd  %xmm3,%xmm2
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [22 x i8] c"%.13lf\0A%.13lf\0A%.13lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 0, i32* %1
store double 0x400921FB4D12D84A, double* %2
%10 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %3, double* %4, double* %6)
%11 = load double, double* %6
%12 = fmul double %11, 0x3F91DF469D353918
store double %12, double* %6
%13 = load double, double* %3
%14 = load double, double* %3
%15 = load double, double* %4
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = call double @llvm.fmuladd.f64(double %13, double %14, double %17)
%19 = load double, double* %3
%20 = fmul double 2.000000e+00, %19
%21 = load double, double* %4
%22 = fmul double %20, %21
%23 = load double, double* %6
%24 = call i32 @cos(double %23)
%25 = sitofp i32 %24 to double
%26 = fneg double %22
%27 = call double @llvm.fmuladd.f64(double %26, double %25, double %18)
%28 = call double @sqrt(double %27)
store double %28, double* %5
%29 = load double, double* %3
%30 = load double, double* %4
%31 = fmul double %29, %30
%32 = load double, double* %6
%33 = call double @sin(double %32)
%34 = fmul double %31, %33
%35 = fdiv double %34, 2.000000e+00
store double %35, double* %7
%36 = load double, double* %3
%37 = load double, double* %4
%38 = fadd double %36, %37
%39 = load double, double* %5
%40 = fadd double %38, %39
store double %40, double* %8
%41 = load double, double* %7
%42 = fmul double 2.000000e+00, %41
%43 = load double, double* %3
%44 = fdiv double %42, %43
store double %44, double* %9
%45 = load double, double* %7
%46 = load double, double* %8
%47 = load double, double* %9
%48 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %45, double %46, double %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [22 x i8] c"%.13lf\0A%.13lf\0A%.13lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %3
%9 = fmul double %8, 0x3F91DF469D353918
store double %9, double* %3
%10 = load double, double* %1
%11 = load double, double* %2
%12 = fmul double %11, %11
%13 = call double @llvm.fmuladd.f64(double %10, double %10, double %12)
%14 = call i32 @cos(double %9)
%15 = sitofp i32 %14 to double
%16 = fmul double %10, -2.000000e+00
%17 = fmul double %16, %11
%18 = call double @llvm.fmuladd.f64(double %17, double %15, double %13)
%19 = call double @sqrt(double %18)
%20 = load double, double* %1
%21 = load double, double* %2
%22 = fmul double %20, %21
%23 = load double, double* %3
%24 = call double @sin(double %23)
%25 = fmul double %22, %24
%26 = fmul double %25, 5.000000e-01
%27 = load double, double* %1
%28 = load double, double* %2
%29 = fadd double %27, %28
%30 = fadd double %19, %29
%31 = fmul double %26, 2.000000e+00
%32 = fdiv double %31, %27
%33 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %26, double %30, double %32)
ret i32 0
}