Need to do somethin for each of every fifth iteration, somehow, this doesn't quite work, can't get the gist of it, what did I do wrong:
for (int i=1; i<1000; i++)
{
if (i % 1 == 0)
{
// Do something here for all iterations that end in 1 or 6
Console.WriteLine("Iteration:" + i.ToString());
}
if (i % 2 == 0)
{
// Do something here for all iterations that end in 2 or 7
Console.WriteLine("Iteration:" + i.ToString());
}
if (i % 3 == 0)
{
// Do something here for all iterations that end in 3 or 8
Console.WriteLine("Iteration:" + i.ToString());
}
if (i % 4 == 0)
{
// Do something here for all iterations that end in 4 or 9
Console.WriteLine("Iteration:" + i.ToString());
}
if (i % 5 == 0)
{
// Do something here for all iterations that end in 5 or 0
Console.WriteLine("Iteration:" + i.ToString());
}
};