Looped Array to print as csv

UKHeliBob:
Why have count variable ?

With the example data

int anArray[3][2] = {{12, 1}, {14, 0}, {16, 1}};

what should the output look like ?

The output would be "12,16". I tried to make the count print the amount of commas but
I cant forever for the life of me get the right amount.
If the array reads:

int anArray[3][2] = {{12, 0}, {14, 0}, {16, 1}};

The output reads "16," where i don't want a comma at all