I cannot paste my whole code, but my desired output is not coming up. I know there are a lot of brackets and if I delete all of them I get an error message.
else{
if (distance <= 500){
if (weight >= 2){
rate = 1.10;
calculated_rate = 1.10;
}
else if (weight > 2 && weight <= 6){
rate = 2.20;
calculated_rate = 2.20;
}
else if (weight > 6 && weight <= 10){
rate = 3.70;
calculated_rate = 3.70;
}
else {
rate = 4.80;
calculated_rate = 4.80;
}
}
else if (distance > 500 && distance <= 1000){
if (weight >= 2){
rate = 1.10;
calculated_rate = 2.20;
}
Aucun commentaire:
Enregistrer un commentaire