```
int main() 
{ 
   int year;
   cin>>year; 

        switch (year)  
        { 
        case 1000 ... 1500: 
            cout<<"less than 1501";
            break; 
        case 1502 ... 2500: 
            cout<<"greater than 1501"; 
            break; 
        case 1501:
            cout<<"1501";
        } 

    return 0;

}  

```

Is this more efficient or:-

```
if(year<1501)
{ 
 cout<<"less than 1501";
}

else if(year>1501 && year<2700)
{
 cout<<"greater than 1501 but less than 2700";
}

```

This is a small example but if the range is very big and the number of cases are also numerous then will the switch case approach or the if-else will be better.