请问这个代码如何实现区分上午下午(24制换成12制)
#include <stdio.h>
int main()
{
//定义变量
int distance=12;
int Time=8;
float cost;
if (Time>=23||Time<=5)
{
cost=14+2.3*1.2*distance;
}
else
{
cost=14+2.3*distance;
}
if (distance<=3)
{
cost=14;
}
if (Time>=12)
{
Time=Time-12;
}
printf("小明%d点上班要花%.2f元钱", Time, cost);
return 0;
}