Before each flight we check whether there is enough fuelfor the trip plus a reserve. Distance, fuel on board, andhow efficient the aircraft is. Tell me go or no-go, andif it is no-go tell me how short we are.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
Distance: 900 Fuel: 210 Efficiency: 4.5NO-GO. Short by 10.0 units including reserve.900 ÷ 4.5 is 200 units for the trip, and the sample's reserve is 10% of that, so 220 are needed against 210 on board. Test a GO case too.
Your requirements list and your program file, named cc-fuel-check.