Output of my program is not in coming out in correct order.

Printable View