#include <stdio.h>
// Функция степени.
int degree(int x, int n) {
int a = 1;
int b = 1;
while(a <= n){
b = x * b;
a++;
}
return b;
}
//Функция факториала.
float factorial (float n) {
float a = 1;
float b = 1;
while(a <= n){
b = a * b;
a++;
}
return b;
}
float sine(int x) {
float n;
float sum = 0;
for (n = 0; n <= 10000; n++) {
sum += degree(-1, n) * degree(x, 2 * n + 1 ) / factorial(2 * n + 1);
}
return sum;
}