if语句怎样转换成switch语句~public class TaxDemo{public static void main(String args[]){double dTotal=0,dStart=0,dtax=0;dTotal=3000.00;dStart=1600.00;double dbalance=dTotal-dStart;if(dbalance0&&dbalance0&&dbalance2000&&dbalance5000&&dbalance2

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 08:24:38
if语句怎样转换成switch语句~publicclassTaxDemo{publicstaticvoidmain(Stringargs[]){doubledTotal=0,dStart=0,dtax

if语句怎样转换成switch语句~public class TaxDemo{public static void main(String args[]){double dTotal=0,dStart=0,dtax=0;dTotal=3000.00;dStart=1600.00;double dbalance=dTotal-dStart;if(dbalance0&&dbalance0&&dbalance2000&&dbalance5000&&dbalance2
if语句怎样转换成switch语句~
public class TaxDemo
{
public static void main(String args[])
{
double dTotal=0,dStart=0,dtax=0;
dTotal=3000.00;
dStart=1600.00;
double dbalance=dTotal-dStart;
if(dbalance0&&dbalance0&&dbalance2000&&dbalance5000&&dbalance20000&&dbalance40000&&dbalance60000&&dbalance80000&&dbalance100000)
dtax=dbalance*0.45-15375;
System.out.println("应缴纳个人所得税:"+dtax+"元");
}}
怎么用switch语句改写,或者怎么用switch语句编写出相同功能的

if语句怎样转换成switch语句~public class TaxDemo{public static void main(String args[]){double dTotal=0,dStart=0,dtax=0;dTotal=3000.00;dStart=1600.00;double dbalance=dTotal-dStart;if(dbalance0&&dbalance0&&dbalance2000&&dbalance5000&&dbalance2
if(dbalance