im currently doing an assignment for a programming class and im not sure how to do this part.

"If the first digit of the zip code is a "4" then there is an additional surcharge of 5% on the shipping cost. If the first digit of the zip code is a "6" then there is an additional shipping cost surcharge of 9% based on the weight of the package. For all other zip codes there is an additional shipping cost surcharge of 14%. Additionally, if the zip code is even, then there is an additional charge of 2% of the shipping cost."

basically, i'm a delivery company. i ask for a zipcode, and depending on the the first number of that zip code, i give a "surcharge", or "tax".

i have no idea what the code is on how to find whether the first digit is even or odd. thats what what i mainly ned to know

help would be appreciated.