import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner (System.in);
        System.out.println("tax calculator");
        
        System.out.println("total sales");
        int sale = sc.nextInt();
      
        float tax1 = (sale*5f)/100;
        float tax2 = (sale*20f)/100;
        float tax3 = (sale*30f)/100;
    
        
        if (sale>=250000)
       { 
        System.out.println("tax = "+tax1);
       }
       else if (sale>=500000)
       {
        System.out.println("tax = "+tax2);
       }
        
        else if (sale>=1000000)
        {
        System.out.println("tax = "+tax3);
        }
        
        else 
        {
            System.out.println("minimum sales should be 2.5 lac");
        }
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: