def factorielle(n):
    if n == 0:
        return 1
    return n * factorielle(n-1)

def sin(x,n):
    s = 0
    for k in range((n+1)//2):
        s += (-1)**k * x**(2*k+1) / factorielle(2*k+1)
    return s
