3. A taxi charges an amount of 25.00 pesos for the first 300 meters and a fix rate of 15.00 pesos for every 200 meters thereafter. Any distance covering the next 200 meters zone (or less) is still charged 15.00. Create a program that would input the DISTANCE in kilometers that the taxi traveled and output the COST of the trip.jeffrey on turbo C

Votes + Comments
Dimwit thread hijacker with the "plzdomyhomework" pith - just go away moron.
How does this post help the ellenski solve his/her problem? And 2.5 years too late?
8 Years
Discussion Span
Last Post by Ancient Dragon

This is a simnple grade-school level math problem.

amount = 25
distance -= 300
if distance is greater than 0 then amount = amount + 15 * ((distance % 200)+1)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.