title: How can we get range of number
body: <p>I want to make a range number(for example: 1-10), according to user input in <code>C#</code>. 
  I have a asp text-box, button. User can enter a number in text-box which is less than 10,000.
  I want, when user click on button user get the range of his input value.</p>
  
  <p>For Example - If user enter <code>"35"</code> in text-box, he get <code>"Number Range: (31-40)"</code>.</p>
  
  <p>but, I have some special condition with making range -</p>
  
  <p>If enter number between -</p>
  
  <p>a) 1 to 50  the length of range is 10 - for example enter number is - <code>49</code>, range is <code>(41-50)</code>. </p>
  
  <p>b) 51 to 100  the length of range is 25 - for example enter number is - <code>78</code>, range is <code>(76-100)</code>. </p>
  
  <p>c) 101 to 200  the length of range is 50 - for example enter number is - <code>135</code>, range is <code>(101-150)</code>. </p>
  
  <p>d) 201 to 400  the length of range is 100 - for example enter number is - <code>245</code>, range is <code>(201-300)</code>.</p>
  
  <p>and so on........ </p>
  
  <p>I used <code>Switch Case</code> for this but, I didn't get success in create correct logic to get this functionality. </p>
  
  <p>Thanks for help...Any help will be appreciated.</p>