for (initialize variable; test; increment)
for (i=0; i<=10; i++)I understand this will make "i" increment by counts of 1 until the loop is satisfied. However, how do I make it increment by 3?
Obviously this is wrong buy my intent is:
for (i=0; i<=12; i+3)
Also, can you call a function as the increment? I couldn't get that to work either.
Obviously this is wrong buy my intent is:
for (i=0; i<=12; somefunction(i))
printf ("%i\n", i);
return 0;
}
int somefunction (int x)
{
return (x + 3);
}