Answer:
See Explanation
Step-by-step explanation:
To solve this, I'll skip variable declarations
if (dept == 5 && price >= 100){//1
discount = 0.20;
}
else if (price >= 100){ //2
discount = 0.15;
}
else if (dept == 5 && price < 100){//3
discount = 0.10;
}
else if (price < 100){//4
discount = 0.05;
}
The question requires if conditional statements and that has been shown in the above lines of code
Also, the comments (//) indicates the number of each line and it does exactly what is required.