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

[ad_1]

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;

[ad_2]

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