Output the array so that 10 elements per line are printed
<p>I'm very new to java (like a month old). This week we have a programming problem that I'm having difficulty with. We are asked to write a program that declares an array "alpha" of 50 elements of type "double". Initialize the array so that the first 25 elements are equal to the square of the index variable and the last 25 elements are equal to three times the index variable. Output the array so that <strong>10 elements per line are printed</strong>. I've gotten the output right so far, but it's <strong>still only printing 1 value per line</strong>, here's what I have so far, what am I doing wrong? Any help is super appreciated!!</p>

<pre><code>import java.util.*;
public class progprblm5{
public static void main(String[] args){

  double alpha[] = new double[50];

  for(int i =0;i&lt;25;i++)
     {alpha[i]= i*i;}

  for(int i = 25;i&lt;50;i++)
     {alpha[i]= i*i*i;}

  System.out.println( "The values are: ");
     for(int i=0;i&lt;50;i++)   
  System.out.println(alpha[i]);
  }
  void print(double array[])
     {
     for(int i=1; i &lt;= array.length; i++)
     {
  System.out.print(array[i+1]+ " , ");
     if(i%10==0)
  System.out.print("\n");
  }
  }
 }
</code></pre>