Taximeter simulation and C program