public class Solution {
public static void main(String[] args) {
System.out.println(konwertujCelsjuszaNaFahrenheita(41));
}
public static double konwertujCelsjuszaNaFahrenheita(int celsjusz) {
double tf = 9 /5.0 * 41 + 32;
return tf;
the task isn`t finshed.
Why?
why task isn't finished
Dyskutowane
Komentarze (1)
- Popularne
- Najnowsze
- Najstarsze
Musisz się zalogować, aby dodać komentarz
Guadalupe Gagnon
20 września 2021, 14:08
The konwertujCelsjuszaNaFahrenheita() method, according to the task, needs to convert any integer passed to it to Fahrenheit. The code you shared has the method only returning the calculation 9 /5.0 * 41 + 32. Since it doesn't work the way it is supposed to, the validation system fails it. You are going to need to fix this to pass.
Put this code in your main method:
The correct output for this, when your konwertujCelsjuszaNaFahrenheita() method is coded correctly will be:
105.8
71.6
96.8 0