Created
December 6, 2021 22:13
-
-
Save felipecastrosales/1305f4cfe4d53d04242f6059b867ce6c to your computer and use it in GitHub Desktop.
Multiple Case | Switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
int algarismo = 7; | |
switch(algarismo) { | |
case -3: | |
case -2: | |
case -1: | |
print('Você escolheu negativo'); | |
break; | |
case 1: | |
case 2: | |
case 3: | |
print('Você escolheu positivo'); | |
break; | |
default: | |
print('Você escolheu um número desconhecido: $algarismo'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment