# Current iteration number in "do" command

How can I obtain the current iteration number of the "Do" command? For example I want $$N$$ to be my iteration number in the following command:

Do[k = 3 i; Print[{N, k}], {i, 2, 6, 2}]


So I essentially want

Do[k = 3 i; Print[{N, k}], {i, 2, 6, 2}]
{1,6}
{2,12}
{3,18}

• In this case, does it not make sense to say Do[k=6i; Print[{i, k}] , {i, 1, 3}] ? But anyway, just set count = 1 before the Do and then Print[{count++, k}]  inside... May 1 '20 at 21:05
• Do[k = 3 i; Print[{i/2, k}], {i, 2, 6, 2}] or more simply Do[Print[{i/2, 3 i}], {i, 2, 6, 2}] May 1 '20 at 21:07
• Just to state the obvious, though, have you considered Table[{i, 6 i}, {i, 3}] instead? Typically procedural loops are not the done thing in Mathematica. May 1 '20 at 21:44
• Oh my example wasn't what I'm actually running, I only added it to clarify what I'm asking. I want a general method. Chris Degnen's answer below answers my question in a general method. May 1 '20 at 22:59
• As a heads up, you cannot use N as a variable, it is a built-in function in Mathematica. May 1 '20 at 23:29

x = 0;

ProgressIndicator[Dynamic[k/(3 20)]]