Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hsa.Stdin;
- public class Batman
- {
- public static void main (String [ ] args)
- {
- String name;
- double income,totaltax,tax1,tax2,tax3,tax4;
- tax1 = 0;
- tax2 = 0;
- tax3 = 0;
- tax4 = 0;
- totaltax = 0;
- System.out.println ("tax calculator");
- System.out.println ("Please enter your name");
- name = Stdin.readString ( );
- System.out.println("please enter your total income");
- income = Stdin.readInt ( );
- if ((income-146093)>=0) {
- tax1 = (income-146092)*.29;
- tax2 = (146092-98162)*.26;
- tax3 = (98161-54600)*.22;
- tax4 = (54599-11039)*.15;
- totaltax =(tax1+tax2+tax3+tax4);
- }
- else if ((income-98162) >= 0) {
- tax1 = (income-98161)*.26;
- tax3 = (98161-54600)*.22;
- tax4 = (54599-11039)*.15;
- totaltax = (tax1+tax3+tax4);
- }
- else if ((income-54600) >= 0) {
- tax1 = (income-54600)*.22;
- tax4 = (54599-11039)*.15;
- totaltax = (tax1+tax4);
- }
- else if ((income-11039) >= 0){
- tax1 = (income-11038);
- totaltax = (tax1);
- }
- System.out.println ("------------------Federal Taxes--------------------");
- System.out.println ("name:" +name);
- System.out.println ("income" +income);
- System.out.println ("total tax:"+totaltax);
- System.out.println ("-----------------Province / Territories----------------");
- System.out.println ("1.Alberta 10%");
- System.out.println ("2.British Columbia 6%");
- System.out.println ("3.Manitoba 11%");
- System.out.println ("4.New Brunswick 10%");
- System.out.println ("5.Newfoundland & Labrador 11%");
- System.out.println ("6.Northwest Territories 6%");
- System.out.println ("7.Nova Scotia 9%");
- System.out.println ("8.Nunavut 4%");
- System.out.println ("9.Ontario 6%");
- System.out.println ("10.Prince Edward Island 10%");
- System.out.println ("11.Quebec 9%");
- System.out.println ("12.Saskatchewan 11%");
- System.out.println ("13.Yukon 7%");
- switch(Province)
- } // main method
- } // Batman class
Advertisement
Add Comment
Please, Sign In to add comment