[Solved] Adding conditional statement to the number of times a loop is executed [closed]


You can use a Count variable.

int count=0;
Loop()
{
      count++;
}
if (count==1)
      do something;
else
      do something else;
if (count%2==0)    //count is even
      do this;
else               //count is odd
      do that;

solved Adding conditional statement to the number of times a loop is executed [closed]