In C#, how would I go about converting the result of a For Loop into an Array and count (Display on the Console) the number of integers stored in that converted array?
Please see below for what I have thus far:
for (int i = 1; i < 100; i++)
{
if (i % 3 == 0)
{
Console.WriteLine(i);
}
}
And feel free to let me know if there is a different way to count the results of the code I have above. Please let me know what you think.