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 scan=new Scanner();
        int num=scan.nextInt();
        int rem=num%3;
        switch(num){
            case 0:
                    System.out.println("The number is divisible");
                    break;
            case 1 :
                      System.out.println("The number is not divisible by 3 ");
                    break;
            case 2: 
                      System.out.println("The number is not divisible");
                    break;
                    
      }
    }
}

Embed on website

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