标签:new ble cal stat 接收 imp next exti class
import java.util.Scanner;
public class Taxi
{
public static void main(String []agrs){
Scanner s = new Scanner(System.in);
int i = s.nextInt();
double a = 0;
if( i <= 3){
a = 8;
}
if ( i > 3 && i <= 5)
{
a = 8 + 1.2*(i - 3);
}
if (i > 5)
{
a = 10.4 + 1.5(i - 5);
}
System.out.println("你打车收取的费用为:"+a);
}
}
打车起步价8元(3KM以内) 超过3KM,超出的每公里1.2元 超过5KM,超出的每公里1.5元 请在键盘上接收公里数,得出总价。
标签:new ble cal stat 接收 imp next exti class
原文地址:https://www.cnblogs.com/lanfeng02/p/13332741.html