/**
文件名称:计程车计费.c
作者:安理计算机 杨腾飞
日期:2019.2.10 版本:v1.0
问题描述:费用为前x公里(km) y元,以后每公里z元
知识点:基础输入输出及运算
*/
#include<stdio.h>
main()
{
float x; //初始距离
float y,s; //初始费用,总距离
float z; //每公里费用
float prize; //总金额
puts("Please input the root prize , the root distance , the per prize and the final distance:\n");
scanf("%f%f%f%f",&y,&x,&z,&s);
prize=y+(s-x)*z;
printf("The total prize is %f\n",prize);
}