Respuesta :
Answer:
The last option of the following question is not correct, which is:
double discount = 0.10 * price;
if (price <= 100)
{
discount = 0;
}
Explanation:
Because the formula of the discount is not initialized inside the condition section but, in the last option the formula is initialized at that time when the variable is declared.
This option may be right, if the formula is initialized inside the else section like:
double discount = 0;
if (price <= 100)
{
discount = 0;
}
else
{
discount = 0.10 * price;
}
Answer:
im sure since this question was 2 years ago you dont mind me snatching these points so i can level up. fanks