出租车计价

出租车计价

/problem-sets/1325975206586703872/problems/1325977648837648384

#include<stdio.h>
int main(void)
{
	float price=10;
	int time=0;
	float road=0;
	scanf("%f%d",&road,&time);
	if(3<road&&road<=10)price = price+(road-3)*2.0;
	else if(10<road)price = price +14+(road-10)*3.0;
	price =price + (time/5)*2;
	printf("%.0f",price);
	return 0;
} 
posted @ 2020-11-10 14:51  summeriver13  阅读(20)  评论(0)    收藏  举报