What is the logic for this program

Printable View