# include & ltstdio.h & gt
# include & ltmath.h & gt
Master ()
{
Floating point x, p;
Printf ("Please enter the distance (km):");
scanf("%f ",& ampx);
p =(x-5)/5;
p =(x & gt; 5? ceil(p):0);
Printf ("price payable: %3f\n", p);
}
You can also take X here as the number of stops, because one stop is 1 km.