Please see the announcements page for the use of code tags when posting code on the forum.
Go through the code one step at a time to see how the result is what it is. Only after you understand what...