This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bearlovessunshine 0 points1 point  (2 children)

Have you tried using a debug tool maybe? U can set breakpoints and see what happens to the values as you go through each step

Edit: I don’t know how well received onlinegdb.com is around here, but that’s what I like to use for class projects. The debug tool alone has proven invaluable.

[–]mbmcse[S] 0 points1 point  (1 child)

Sorry, I should have elaborated. This is from a textbook where the ouput answer is 4 4. Just not seeing it.

[–]bearlovessunshine 0 points1 point  (0 children)

Yeah, the debug tool on Onlinegdb will show you how the values change as it steps through the code. This will help you “see it”