Skip to content

Instantly share code, notes, and snippets.

@chingovan
Created June 24, 2015 15:53
Show Gist options
  • Save chingovan/f937f1cdbb53b6cae4d1 to your computer and use it in GitHub Desktop.
Save chingovan/f937f1cdbb53b6cae4d1 to your computer and use it in GitHub Desktop.
x = float(input("Nhap vao x: "));
eps = float(input("Nhap so sai so :"))
s = 1
t = 1
i = 1
while t > eps:
t = t * x / i
i = i + 1
s = s + t
print("e^%f = %f" % (x, s))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment