I have done task 1 but don\'t understand task 2. Please use any ide to solve. of
ID: 3797799 • Letter: I
Question
I have done task 1 but don't understand task 2. Please use any ide to solve.
of our output. Make sure to prompt the user Please focus on the ormattin appropriately and round the output accordingly. 1 Task: Write a program that computes a single filer's income tax burden. Single Filers Income TAX RATE 10 Up to $600 $6,001-$27,950 15% 27% $27,951 $67,700 $67,701 $141,250 R35 $141,251 $307,050 $307, 051 or more 38.6% The user should be able input her Income. If the user enters an income value less than or equal 0, the program should prompt t stop. The output can be a simple system.out.printf output. Please create a whiteboard or seduecode process. Attach a Snipping Photo Below e Output- //Output should have Sam for dollars, 2 decima place ncome tax for a single person making $85000.00 is $25500.00 Output 2 ncome tax for a single person making $9800.00 is $1470.00 comejava import java .util. Scanner; public class Income t public static void main(String args double income; double tax input Scanner (System.in) Scanner System.out.print ("Input your income: income input nextInt 10 11 if (income 0 && ++income 6000)t 12 tax 13 0.1 income system. out.printf("income tax for a single 14 "perosn aking $2.2f is $%.2f%n", income, tax) 15 16 helse if (income 6001 && income 27950){ tax 18 0.15 income system out. printf("income tax for a single 19 "perosn making $22.22f is 2fen", income, tax) 20 67700) tax income 0.27 23 system out. printf ("income tax for a single "perosn making $25.2f is $%.2fxn", income, tax) 25 income 141250) else if (income 67701 && tax income 0.30; 28 system.out.printf ("income tax for a single 29 "perosn making $24.2f is $%.2f%n", income, tax) 31 141251 && income 307050){ helse if (income tax income 35 System.out.printf("income tax for a single 34 "perosn aking $26.2f is $%.2f%n", income, tax) 35 e if (income 307050) tax income 38.6/100 System.out.printf("income tax for a single 39 "perosn making $%.2f is $7%.2f%n", income, tax) else System. out.println("Wrong Input; try again n.")Explanation / Answer
In task 2, the only difference from task 1 is that you have to take the tax rate as an input from the user instead of using it from the table.
Following is the complete code in Java where you can acheive the above:
//code starts here
//code ends here
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.