I am trying to write a simple programm that displays multiples from 5 up to 1000. But the console is empty when executed. It is not clear to me why this is happening. I am still a beginner so please excuse this maybe stupid question. Thank you!
int[] nums = new int[] { };
for (int i=1; i < nums.Length; i++)
{
//Checks if number is divisible by 5
if (i%5 == 0)
{
//Creates Array input in right index
int tst = i / 5 - 1;
//Writes i to array
nums[tst] = i;
}
}
Console.WriteLine(String.Join("; ", nums));