Study Display 3.1. Based on the income tax rate in Taiwan,
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.
import java.util.Scanner;
public class IncomeTax {
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
double netIncome = 0.0,tax = 0.0;
System.out.println("請輸入所得淨額");
netIncome = keyboard.nextDouble();
if(netIncome <= 370000)
tax = netIncome*0.06;
else if((netIncome >= 370001)&&(netIncome <= 990000))
tax = netIncome*0.13-25900;
else if ((netIncome>=990001)&&(netIncome<=1980000))
tax = netIncome*0.21-105100;
else if ((netIncome>=1980001)&&(netIncome<=3720000))
tax = netIncome*0.3-283300;
else if( netIncome >= 3720001 )
tax = netIncome*0.4-655300;
System.out.printf("應繳所得稅為"+ tax + "元" );
}
}
沒有留言:
張貼留言