请问各位前辈,我有一个停车收费问题
就是第17行,为什么要(i<480+30)
对于这行我真的不懂,希望各位指教
package CarMoney;
import java.util.Scanner;
public class CarMoney
{
public static void main(String args[])
{
Scanner scanner = new Scanner(System.in);
System.out.print("请输入0~720分钟之任意值");
int i;
int price;
i = scanner.nextInt();
if(i<480+30)
{
if(i < 30)
{
System.out.println(i + "分钟为免费");
}
else
{
if(i / 30 > 0 & i %30 ==0)
{
price = ((i-30)/30)*15;
System.out.println(i + "分钟为" + price + "元");
}
else
{
price = 15 + ((i-30)/30) * 15;
System.out.println(i + "分钟为" + price + "元");
}
}
}
else
{
System.out.println(i + "分钟为240元");
}
}
}