[Solved] Please help me understand Arrays [closed]


first part

double[] arr=new double[50];
for(int i=0;i<25;i++)
    arr[i]=i*i;

second part

for(int i=25;i<arr.length;i++)
   arr[i]=3*i;

third part

for(int i=0;i<arr.length;i++)
{

         if((i%10==0)&&i!=0)
             System.out.println(arr[i]+" ");
           else
             System.out.print(arr[i]+" ");


}

I’m not sure if i understood you but the first part is the squared index, the second is the double index, the third is printing the array, notice that after every 10 printings it goes to a new line.

3

solved Please help me understand Arrays [closed]