Wow, what a horrible function. Oh well, I guess you have to do what the teacher wants but hopefully your teacher also explains why it's silly to write stepen() to behave like that