Stuck at problem in C++.

I am learning C++ from book "Problem Solving With C++ by Walter Savitch" and I am stucked at a problem given in practice exercise, this exercise has only problems with no solutions. Can you tell how to solve this problem. I have uploaded problem in image in following link:-

https://i.imgsafe.org/ad450e7.png
Thanks
Topic archived. No new replies allowed.