I'm got three int that I want to find the average of, So I divide by 3 and used
When I divide the ints by three I am getting a double but it only shows up like 59.00 or 74.00, when the 0's should have a decimal number.
I divided the numbers in my array like this:
Why is it showing up as .00 on the end? Is there a different method to divide ints that equal a double? thanks
Code:
DecimalFormat twoDigits= new DecimalFormat("0.00");
When I divide the ints by three I am getting a double but it only shows up like 59.00 or 74.00, when the 0's should have a decimal number.
I divided the numbers in my array like this:
Code:
averages[z][y] = (grades[z][y] + grades[z][y+1] + grades[z][y+2])/ 3;
Why is it showing up as .00 on the end? Is there a different method to divide ints that equal a double? thanks