1 2 3 4 5 6 7 8 9 10 11 12 13
|
printf("Type of vehicle (c - t - b)\t\t");
scanf("%c\n", &vehicle);
switch (vehicle)
{
case 'c': carcharges (hourin, minin, hourout, minout, charge, minutes, hours);
break;
case 't': truckcharges (hourin, minin, hourout, minout, charge, minutes, hours);
break;
case 'b': buscharges (hourin, minin, hourout, minout, charge, minutes, hours);
break;
default: printf("invalid\n");
}
|