Ending elements in array with period

I don't know how to end the elements of the following array with a period instead of a comma.
1
2
3
4
5
6
  for(int i = 0; i < num_elements; i++)
    {
        array_intergers[i] *= x;
        cout<<array_intergers[i]<<","; //obviously this array ends with a comma i need a period.
    }

Thanks
Is this what you mean??

cout<<array_intergers[i]<<".";
I need it to look like:

1,2,3,4,5.

like that
ah..
for(int i = 0; i < num_elements; i++)
{
array_intergers[i] *= x;
if(i==num_elements-1)
{cout<<array_intergers[i]<<".";}
else
{cout<<array_intergers[i]<<","; }//obviously this array ends with a comma i need a period.
}
Ah i see now, thanks for your help
Topic archived. No new replies allowed.