A taxi charges for $20 for the first 300 meters and $2 for every 200 meters thereafter. Any distance covering the next 200 meters zone is still charged $2. Make a program that input the distance (in Meters) a trip took and output the fee.
My code so far.
Code:#include <stdio.h> main() { int meters; float taxi_charges; printf("Input the distance in meters: "); scanf("%d",&meters); if(meters <= 300) { taxi_charges = 20.0; // I don't have to do what next to code. } }