I am using an online compiler to run this simple code but its giving a runtime error, "could not find or load class Main" There is no other syntax error. Kindly suggest a solution.
import java.io.*;
class weird
{
void main ()throws IOException
{
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
int n;
System.out.println("Enter a number");
n=Integer.parseInt(br.readLine());
if (n>=1 && n<=100);
{
if(n%2!=0);
System.out.println("Weird");
if(n%2==0);
{
if(n<=5&&n>=2)
System.out.println("Not Weird");
else if(n<=20&&n>=6)
System.out.println("Weird");
else if(n>20)
System.out.println("Not Weird");
}
}
}
}