Hi guys,
please check my code and help me cus I'm totally helpless.
The result is correct, everything seems like OK but the Mentor still gives this mesage:
"When converting degrees, use the factor 9/5. To get the correct result, use doubles (not ints) to calculate this fraction. The conversion can be expressed as: double fahrenheit = 9 / 5.0 * celsius + 32.".
Thank you in advance!
Mark
package com.codegym.task.task01.task0130;
/*
Our first converter!
*/
public class Solution {
public static void main(String[] args) {
System.out.println(convertCelsiusToFahrenheit(41));
}
public static double convertCelsiusToFahrenheit(int celsius) {
//write your code here
//TC = (TF - 32) * 5/9.
celsius=41;
// double TF= 9 / 5.0 * celsius + 32;
double fahrenheit = 9 / 5.0 * celsius + 32;
return fahrenheit;
}
}