-5 java if-statement
所以我有多个if-else语句,如果用户是am/f以及他们选择决定他们的tdee的选择.
这是代码的一大块:
else if (gender.equalsIgnoreCase("M") && (choice.equalsIgnoreCase("C"))
{
activityFactor = 1.6;
}
else if (gender.equalsIgnoreCase("F") && (choice.equalsIgnoreCase("C"))
{
activityFactor = 1.5;
}
Run Code Online (Sandbox Code Playgroud)
你有一个额外的(你不需要.它与此无关&&
else if (gender.equalsIgnoreCase("M") && choice.equalsIgnoreCase("C"))
Run Code Online (Sandbox Code Playgroud)
你必须拥有与)你相同的数量(.
| 归档时间: |
|
| 查看次数: |
71 次 |
| 最近记录: |