Hi, so my problem is that I need a method that does the calculation for my program and return it. Here's what I have so far. It keeps saying that the method needs to return a double value. Can someone help me? Thanks in advance.
private double spoonConvert (double answer)
{
if (unit == 1 && unit2 == 2)
return (amount / 3);
else if (unit == 1 && unit2 == 3)
return (amount / 48);
}
unit, unit2 and amount are declared somewhere in my program.
What I want is that it only return a certain equation when the user input a certain value.