Why is k equal to 17? I understand that i is 5, but how is 0+5=17?
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;
system("PAUSE");
} // main