This works. However, it would help code readability if changed to (n > 0).