Hi there, I'm having trouble trying to fill a 1D array with odd numbers from 1 to 12 using loops. thanks in advance =) this is what i have so far:
int[] odd = new int[6];
odd[0]=1;
for(int j=0;j<6;j++)
{
for ( int i=0;i<12;i++)
{
if(i%2==0)
even[j]=2 * j + 1; break;
}
}
for (int i:odd)
System.out.println(i);