Когда я запускаю следующий код в java, он не дает мне правильный средний результат, который должен быть 97,5. Кто-нибудь может мне помочь.Среднее вычисление Java
//class
public class NumericTypes {
public static void main (String [] args) {
final int NUMBER = 2 ; // number of scores
final int SCORE1 = 100; // first test score
final int SCORE2 = 95; // second test score
final int BOILING_IN_F = 212; // freezing temperature
int fToC; // temperature in Celsius
double average; // arithmetic average
String output; // line of output to print out
// Find an arithmetic average
average = (SCORE1 + SCORE2)/NUMBER;
output = SCORE1 + " and " + SCORE2 + " have an average of " + average;
System.out.println(output);
// Convert Fahrenheit temperatures to Celsius
fToC = (BOILING_IN_F - 32) * 5/9;
output = BOILING_IN_F + " in Fahrenheit is " + fToC + " in Celsius.";
System.out.println(output);
System.out.println(); // to leave a blank line
}
}
Спасибо за вашу помощь он работает. – user3473695