Q:

JavaScript switch statement 1-100

I am trying to write a JavaScript switch where the user enters a number from 1-100 and they receive a message based on what range the number falls into. This is what I have written so far.
I am doing this for an intro to programing class, and I don't fully understand how to get this to work, my problem is that I can't figure out how to show a range, ie: 1-25, 
    <script>
    var number =  prompt("Enter 1-100");
    switch(number)
    {
    case 1-25:
      document.write("1-25");
      break;
    case 26-50;
      document.write("26-50");
      break;
    case 51-100:
      document.write("51-75");
      break;
    case "4":
      document.write("76-100");
      break;
    }
    </script>

A:

Just figuring it out with a little math is probably a better approach :
var number  = prompt("Enter 1-100"),
    message = ['1-25', '26-50', '51-75', '76-100'];

document.write(message[Math.ceil(number/25)-1])

FIDDLE
Divide the returned number with 25, round up to nearest whole number, which gives you 1,2,3 ... etc, and since array indices starts at zero, subtract 1.
EDIT:
If you have to do a switch, you'd still be better off with a little math, and not writing a hundred case's :
var number = prompt("Enter 1-100");
    number = Math.ceil(number / 25 );

switch(number) {
    case 1:
      document.write("1-25");
      break;
    case 2:
      document.write("26-50");
      break;
    case 3:
      document.write("51-75");
      break;
    case 4:
      document.write("76-100");
      break;
}

FIDDLE

