How do I do this program?

After you fix the code, as per post#11, post the new code in code tag </> thingies.