Guest User

taxs

a guest
Mar 7th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    import hsa.Stdin;
  2.    public class Batman
  3.     {
  4.    public static void main (String [ ] args)
  5.     {
  6.    String name;
  7.     double income,totaltax,tax1,tax2,tax3,tax4;
  8.     tax1 = 0;
  9.     tax2 = 0;
  10.     tax3 = 0;
  11.     tax4 = 0;
  12.     totaltax = 0;
  13.    System.out.println ("tax calculator");
  14.    System.out.println ("Please enter your name");
  15.    name = Stdin.readString ( );
  16.    System.out.println("please enter your total income");
  17.    income = Stdin.readInt ( );
  18.    if ((income-146093)>=0) {
  19.    tax1 = (income-146092)*.29;
  20.    tax2 = (146092-98162)*.26;
  21.    tax3 = (98161-54600)*.22;
  22.    tax4 = (54599-11039)*.15;
  23.    totaltax =(tax1+tax2+tax3+tax4);
  24.    }
  25.    else if ((income-98162) >= 0) {
  26.    tax1 = (income-98161)*.26;
  27.    tax3 = (98161-54600)*.22;
  28.    tax4 = (54599-11039)*.15;
  29.    totaltax = (tax1+tax3+tax4);
  30.    }
  31.    else if ((income-54600) >= 0) {
  32.    tax1 = (income-54600)*.22;
  33.    tax4 = (54599-11039)*.15;
  34.    totaltax = (tax1+tax4);
  35.    }
  36.    else if ((income-11039) >= 0){
  37.    tax1 = (income-11038);
  38.    totaltax = (tax1);
  39.    }
  40.    System.out.println ("------------------Federal Taxes--------------------");
  41.    System.out.println ("name:" +name);
  42.   System.out.println ("income" +income);
  43.   System.out.println ("total tax:"+totaltax);
  44.  
  45.   System.out.println ("-----------------Province / Territories----------------");
  46.   System.out.println ("1.Alberta                     10%");
  47.   System.out.println ("2.British Columbia            6%");
  48.   System.out.println ("3.Manitoba                    11%");
  49.   System.out.println ("4.New Brunswick               10%");
  50.   System.out.println ("5.Newfoundland & Labrador     11%");
  51.   System.out.println ("6.Northwest Territories       6%");
  52.   System.out.println ("7.Nova Scotia                 9%");
  53.   System.out.println ("8.Nunavut                     4%");
  54.   System.out.println ("9.Ontario                     6%");
  55.   System.out.println ("10.Prince Edward Island        10%");
  56.   System.out.println ("11.Quebec                      9%");
  57.   System.out.println ("12.Saskatchewan                11%");
  58.   System.out.println ("13.Yukon                       7%");
  59.  
  60.  switch(Province)
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.   } // main method
  69.    } // Batman class
Advertisement
Add Comment
Please, Sign In to add comment