How to test for a range in a switch?

  • Автор темы Автор темы zxcvbn
  • Дата начала Дата начала

zxcvbn

Новичок
Регистрация
17.07.2012
Сообщения
76
Реакции
1
Баллы
0
Hi,

I've a number and I want to test it in the range of 0-30, 30-60 and 60-100. How can I do this with a switch?
Using an if will make the code become too big as I want to replicate this for 5-6 elements.

Thanks
 
You should use IF-statements with multiple logic statements
1345285897-clip-13kb.png
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)