fb pixel

Calculate exp(x)

Implement a function exp(x) that would compute and return the result of with the following formula:
The input contains a single integer x.
The function exp should compute and return the expression up until n = 10 (inclusive).
The program should print the result of exp(x), exp(2x), exp(x/2).
Input
1

Output
2.7182818011463845
7.388994708994708
1.6487212706873655
 
To check your solution you need to sign in
Sign in to continue