I'm a newbie at c# at I was wondering why what I'm trying to do doesn't work.
private int equation;
public int Equation { get => equation; set => equation = value; }
public void GainCaloriesMale(User user)
{
Equation = ((10 * user.Weight) + (6.25 * user.Height) - (5 * user.Age) + 5) + 250 + add;
Console.WriteLine("\nBased on the Mifflin – St Jeor Formula You need to eat {0} Kalories a day To Gain Weight ", equation);
}
Error CS0266 Cannot implicitly convert type 'double' to 'int'. An explicit conversion exists (are you missing a cast?)
Everything after equation is being underlined in red.
Thx for your time.