Silly homework question is silly. This isn't hard, if you want to track it in a compiler though you can create a program in c++ with this code, set a watch for each variable and step through the program one step at a time. But this is simple, you could simply do it with a piece of paper.