Java code for car parking management system

Java code for car parking management system. This program will help you to find the free parking space for cars. By using this program we easily find out which is free space in parking lot.

import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
if(num>=1 && num<=50){
System.out.println("a1");
}
else if(num>=51 && num<=100){
System.out.println("a2");
}
else if(num>=101 && num<=120){
System.out.println("a3");
}
else if(num>=121 && num<=180){
System.out.println("a4");
}
else{
System.out.println("Invalid Input");
}

}
}

60

a3