Questions tagged as 'switch'

1
answer

IF x SWITCH - Simulating

I think we all always have to do some dealings in conditions with few values. I made a test between IF and SWITCH .    All content was created for SIMULAR a more identical structure   possible between IF and S...
asked by 28.03.2018 / 14:59
2
answers

When I execute the commands in the Switch Case, does it quit instead of returning to the Menu?

int main(){ int tensao, corrente, resistencia, potencia, tempo, cargaeletrica, trabalho, i; printf("\nPara calculo de Tensao(resistencia*corrente) digite 1\n\nPara calculo de Potencia(tensao*corrente) digite 2\n\nPara calculo de Corrente...
asked by 22.08.2018 / 16:12
2
answers

switch does not show expected result

What's wrong? It was supposed to appear "worthless", but when it starts with zero it appears "too high" in the message. <?php $num = 0; switch ($num){ case($num>100); echo'valor muito alto'; break; case($num<8...
asked by 04.11.2014 / 23:52
3
answers

Switch Result

<?php include("conectar.php"); $quantidade = 1; $pagina = (isset($_GET ['pagina'])) ? (int) $_GET['pagina'] : 1; $inicio = ($quantidade * $pagina) - $quantidade; $where = ""; $estado = '' . @$_POST['estado']; $distrito = '' . @$_POST['distrit...
asked by 02.04.2014 / 15:07