Well, expanding on timovjl's example, to make it even more clear:
#include<stdio.h>
int main(void)
{
int count = 0;
for (int b = 0; b <= 5; b++)
{
for (int a = 0; a <= b; a++)
{
printf("%2d:%2d,%2d\n",++count,b,a);
}
}
}
adding a counter for each output and reversing the output order of the loop variables...
Ralf