How to dry run any c++ programs?

I've noticed that in order for us to understand any program is by dry running it using a pen and paper and that is much difficult. Please give me a tips on how to dry run a program. Is there a software that will dry run a program and show us how it runs? I want to have that software.
Last edited on
A profiler?
A debugger?
A software that will show like this below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
for i=1
Armstrong=3;
 num=15;
Armstrong=3*3*3=27 
result=0+27=27;

for loop condition check: num is not equal to zero loop will run again

for i=2
Armstrong=5;
num=1;
Armstrong=5*5*5=125 
result=27+125=152;

for loop condition: num is not equal to zero loop will run again

for i=3
Armstrong=1;
num=0;
Armstrong=1*1*1=1; 
result=152+1=153;


for loop condition: num is EQUAL TO ZERO loop will run again

Loop will break and if else condition will be checked as or result=153 and check=153 
What if I see a program that is much harder to understand and how can I dry run it using pen and paper? I really need a software for that.
Last edited on
I want to an expert in dry running a program.
I don't think anything like that exists. Debuggers are as close as it gets, and it's what everyone uses when trying to understand the flow of a program.
Last edited on
How do I use a debugger? Is that easy to use?
you mean like an IDE?
Topic archived. No new replies allowed.