10:output="October";break;
case
11:output="November";break;
case
12:output="December";
}
output+=" "+ year + " has
" + day +" days";
System.out.println(output);
}
}
3.13
import java.util.Scanner;
public class computeTax {
public static void
main(String[] args){
Scanner input=new
Scanner(System.in);
System.out.print("(0-singer,1-m
arried jointly,2-married
separately,3-head of
household)\n"+
"Enter the filing
status: ");
int
stasus=input.nextInt();
System.out.print("Enter
the taxable income: ");
double
income=input.nextDouble();
double tax=0;
if(stasus==0){
if(income<=8350)
tax=income*0.10;
else if(income<=33950)
tax=8350*0.10+(income-8350)*0.1
5;
else if(income<=82250)
tax=8350*0.10+(33950-8350)*0.15
+(income-33950)*0.25;
else
if(income<=171550)
tax=8350*0.10+(33950-8350)*0.15
+(82250-33950)*0.25+(income-822
50)*0.28;
else
if(income<=372950)
tax=8350*0.10+(33950-8350)*0.15
+(82250-33950)*0.25+(171550-822
50)*0.28+(income-171550)*0.33;
else
tax=8350*0.10+(33950-8350)*0.15
+(82250-33950)*0.25+(171550-822
50)*0.28+(372950-171550)*0.33+(
income-372950)*0.35;}
else if(stasus==1){
if(income<=161700)
tax=income*0.10;
else if(income<=67900)
tax=16700*0.10+(income-16700)*0
.15;
else
if(income<=137050)
tax=16700*0.10+(67900-16700)*0.
15+(income-67900)*0.25;
else
if(income<=208850)
tax=16700*0.10+(67900-16700)*0.
15+(137050-67900)*0.25+(income-
137050)*0.28;
else
if(income<=372950)
tax=16700*0.10+(67900-16700)*0.
15+(137050-67900)*0.25+(208850-
137050)*0.28+(income-208850)*0.
33;
else