Using methods and arrays where appropriate, create a programthat calculates how much it costs to fil

Using methods and arrays where appropriate, create a programthat calculates how much it costs to fill up a gas tank. It shouldask how much a gallon costs and assume that the gas tank capacityis 20 gallons. The amount should be printed in dollars andcents.