Page 314 - IT-802_class_12
P. 314

fine = 5.5 * day_late;
                     System.out.println("*---------------------------------------------*");
                     System.out.println("  Name of the student\t\t:"+std_name);
                     System.out.println("  Regd No of the student\t:"+std_regd_no);
                     System.out.println("  Class \t\t\t:"+std_class);

                     System.out.println("  Section \t\t\t:"+section);
                     System.out.println("  Book Name\t\t\t:"+book);
                     System.out.println("  Author Name \t\t\t:"+author);
                     System.out.println("  Book issue on \t\t:"+s1);
                     System.out.println("  Return Date of the Book \t:"+s2);
                     System.out.println("  Fine Amount \t\t\t:"+fine);
                     System.out.println("*---------------------------------------------*");
                 }
             }
        Annual Tax Calculator

          4.   Write a project to calculate the annual tax and print the tax and the salary after deducting the tax according to the
             following criteria.
             Annual Income           Tax

             Up to 1000              5%
             1001 to 5000            7.5%
             5001 to 10000           10%
             Above 10000             15%

             import java.util.*;
             class tax_Calculation

             {
                 public static void main()
                 {
                     Scanner sc= new Scanner(System.in);
                     double ann_inc,tax=0,total;
                     System.out.println("Enter Amount : ");
                     ann_inc=sc.nextDouble();
                     if(ann_inc<=1000)
                         tax = 0.05 * ann_inc;

                     else if(ann_inc<=5000)
                         tax = 0.075 * ann_inc;
                     else
                     if(ann_inc<=10000)
                         tax = 0.10 * ann_inc;
                     else
                         tax = 0.15 * ann_inc;


          312   Touchpad Information Technology-XII
   309   310   311   312   313   314   315   316   317   318   319