Check Free Shipping
This problem comes from a very common online shopping rule. A store gives free shipping only when the order total reaches a certain minimum amount.
Your job is to compare the current order total with that minimum. If the total is high enough, print FREE SHIPPING. If it is still below the requirement, print PAY SHIPPING.
For example, if the order total is 120 and the minimum is 100, the answer is FREE SHIPPING. But if the order total is 75 and the minimum is 100, the answer is PAY SHIPPING.
So the task is simply to compare the order amount with the shipping rule and return the correct message.
Example Input & Output
Matching the minimum amount is enough to qualify.
The order total is still below the required amount.
The order total already meets the free shipping rule.
Algorithm Flow

Solution Approach
A simple way to solve this is to use one comparison.
First, read the order total and the minimum amount needed for free shipping. After that, check whether the order total is greater than or equal to the minimum.
The condition is:
If that condition is true, the order qualifies, so you print FREE SHIPPING.
If that condition is false, the order has not reached the requirement yet, so you print PAY SHIPPING.
This problem is really just one decision based on two numbers, which is why the logic stays short and clear.
Best Answers
Solutions Coming Soon
Verified best solutions for this Challenge are still being analyzed and will be available soon.
Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
