Working factorial program