simple question

I have a for loop that counts to a given number.
I have to stop at every time the count reaches 12.
12,24 ,36 etc.
for(int i=0;i<count;i++)
{
 if(i==12)
  {
  cout<<"test"; //this is what started out with.
  }
}
Please help.
Thank you
strmtrprAsked:
Who is Participating?
 
vmehroConnect With a Mentor Commented:
if (i%12 == 0) will take care of 12 and multiples of 12.


0
 
strmtrprAuthor Commented:
Thank you very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.