October 2018 1 19 Report
Quiero hacer esto en lenguaje C.
como hago?
ya usé el true y al compilar me tira error


switch (true)
{
case x > 0 && x < 10:
alert("x > 0 && x < 10");
break;
case x > 0 && x < 20:
alert("x > 0 && x < 20");
break;
case x < 0 || x > 100:
alert("x < 0 || x > 10");
break;
default:
alert("Ninguno");
}

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.