#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 M_PI;
double cos(int);
int /*<<< orphan*/ printf(char *, int, scalar_t__, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int sin(int);
scalar_t__ sqrt(int);
int main(void) {
  int a, b, C;
  scanf("%d %d %d\n", &a, &b, &C);
  printf("%.8lf\n%.8lf\n%.8lf\n", a * b * sin(C * M_PI / 180.0) / 2,
         a + b + sqrt(a * a + b * b - 2.0 * a * b * cos(C * M_PI / 180.0)),
         b * sin(C * M_PI / 180.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%eax
mov    0x2e5d(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe66(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe1c(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%eax
mov    0x2de0(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xde9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    0x2d71(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xd7a(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
imul   %eax,%ecx
lea    0xd73(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xeaf(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1050 <scanf@plt>
mov    0x8(%rsp),%ebx
imul   0xc(%rsp),%ebx
mov    0x2e63(%rip),%rbp
mov    0x0(%rbp),%eax
imul   0x4(%rsp),%eax
cvtsi2sd %eax,%xmm0
divsd  0xe67(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
imul   %eax,%ebx
mov    %ebx,%r15d
shr    $0x1f,%r15d
add    %ebx,%r15d
sar    %r15d
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
imul   %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x18(%rsp)
imul   %ecx,%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x0(%rbp),%eax
imul   0x4(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movslq %edx,%r14
divsd  0xdfa(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
movsd  0x20(%rsp),%xmm1
mulsd  0xdeb(%rip),%xmm1
mulsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
cvttsd2si %xmm1,%edi
call   1070 <sqrt@plt>
add    %rax,%r14
mov    0x0(%rbp),%eax
imul   0x4(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    0x8(%rsp),%ebp
divsd  0xdac(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
imul   %eax,%ebp
lea    0xdb3(%rip),%rdi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %ebp,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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