How would I write this program?

Printable View