title: Error Trying to Create Array of Double Variable Type
body: <p>I'm trying to create a program which takes values that are doubles from the user and stores them in arrays before dividing them and rounding the answers. However I keep receiving errors trying to create double arrays.</p>
  
  <pre><code> double n = sc.nextDouble();
  
      double a[] = new double[n];
      double b[] = new double[n];
      double roundedValues[] = new double[n];
  
      for (double i = 0; i &lt; a.length; i++) {
          System.out.println("Please enter the values you would like to divide as pairs of two numbers: ");
          // Read pair and store it inside i-th position of a and b arrays 
          System.out.println("Enter first number: ");
          a[i] = sc.nextDouble();
          System.out.println("Enter second number you would like to divide by: ");
          b[i] = sc.nextDouble();
          roundedValues[i] = Math.round(a[i] / b[i]);
      }
  </code></pre>
  
  <p>The error I'm getting where I've declared the arrays says:</p>
  
  <blockquote>
    <p>incompatible types: possible lossy conversion from double to int</p>
  </blockquote>