C++ Questions 4 CCC 2006 Junior

I was reviewing the past CCC contests and this question stumped me. Does anyone know the correct way to solve this problem. Please post code if you have any. Thanks!
Next time, you will get more responses if you actually post the link to the question

http://www.cemc.uwaterloo.ca/contests/computing/2006/stage1/juniorEn.pdf
Which one of the excercises?

Aceix.
I think he is referring to question 4
Topic archived. No new replies allowed.