//Declare num first.
//Correct if condition..
//correct condition checking in for loop
int array[11] = {1,2,3,4,5,6,7,8,9,10,11};
int index=2;
int size=11;
int num = 5;
for(int i=0;i < size;i++)
{
if (i%num==0)
cout << array[i];
}
solved c++ multiple finder [closed]