I'm reviewing for a test and i'm having trouble reading how this outputs, can someone explain to me how its executing using like a chart or something??
like:
i j k
1 0 0
1 1 2 etc.
1 2 3 4 5 6 7 8 9 10 11 12 13
#include <iostream>
usingnamespace std;
void main()
{
int i, j, k = 0;
for (i = 1; i < 5; i++)
for (j = 0; j < i; j += 2)
k += i;
cout << k << endl;
}