I think the code is correct, don't know what's wrong. Result is 150.96. Could you help please?
public class Solution {
public static void main(String[] args) {
System.out.println(getWeight(888));
}
public static double getWeight(double earthWeight)
{
double moonWeight = earthWeight*(17.0/100.0);
return moonWeight;
}
}
package com.codegym.task.task01.task0136;
/*
Even to the moon!
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getWeight(888));
}
public static double getWeight(double earthWeight)
{
double moonWeight = earthWeight*(17.0/100.0);
return moonWeight;
}
}