i am supposed to write a program using nested if/else statements and print the federal tax based on whether the user enter, single or married and how much their income is.
the user should be able to run the program over and over until he/she types 'done'
this is the tax table i have to follow...
single married (percentage stays the same)
tax bracket percentage tax bracket
$0....$8,050 10% $0....$16,050
Amount over $8,050, Amount over $16,050,
up to $78,850 25% up to $131,450
Amount over $78,850, Amount over $131,450,
up to $187,550 30% up to $250,000
Amount over $187,550 35% Amount over $250,050
//Algorithm
//1.Enter whether you are single or married.
//2.Enter your income as a whole number.
//3.
i am unsure how to declare single or married somewhere once the user enters it and im unsure how to make it work for the user to type done..import java.util.Scanner; //so I can use a scanner public class computeTax { public static void main (String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter whether you are single or married."); String line = in.next();
please help!!