Shipping Calculator
Challenge on lesson: Checkpoint: Conditional Logic
CHALLENGE
Difficulty: beginner+25 XP
Implement two functions.
1. double shipping_cost(double weight): up to and including 1.0 kg -> 5.00; over 1.0 up to and including 5.0 -> 10.00; above 5.0 -> 10.00 + 1.50 per full kg above 5 (so 6.2 kg -> 11.50).
2. const char* shipping_label(int speed) using switch: 1 -> "standard", 2 -> "express", default -> "standard".
Press Submit to check your solution.
Back to lesson: Checkpoint: Conditional Logic