Solved

# Java Code

Posted on 2013-11-01

I am trying to return the lowest number from a string of 10 numbers that the user inputs. Here is my code. I'm not getting any errors it just doesn't seem to want to move to the last step of printing the lowest number. Here is my code:

System.out.print("Enter 10 numbers: ");

double [] num = new double [10];

int j;

double finmin = 0;

for(j=0; j < num.length; j++){

num[j] = input.nextDouble();

finmin = min(num);

}

System.out.print("your lowest number is: " + finmin);

}

/**

*

* @param num

* @return

*/

public static double min(double[] num)

{

int j;

double finmin = 0;

for (j = 0; j < num.length; j++){

if (num[j] < j)

finmin = num[j];

else

finmin = num[j];

}

return (finmin);