Another useless loop. squared only set from the last loop.
for (int n = 0; n < array.length; n++)
{
subtracted = array[n] - mean; //subtracts mean from the array
...
Type: Posts; User: Norm
Another useless loop. squared only set from the last loop.
for (int n = 0; n < array.length; n++)
{
subtracted = array[n] - mean; //subtracts mean from the array
...
for (int n = 0; n < array.length; n++)
{
sqroot = Math.sqrt(divided);
}
This loop is doesn't do anything useful. In fact most of your loops are useless. Very few of...
Did you remove ALL of the integer divisions?
Your computations are going to be wrong if you do all the math using ints. For example: 11/6 = 1