Skip to content

Instantly share code, notes, and snippets.

@felipecastrosales
Created December 6, 2021 22:13
Show Gist options
  • Save felipecastrosales/1305f4cfe4d53d04242f6059b867ce6c to your computer and use it in GitHub Desktop.
Save felipecastrosales/1305f4cfe4d53d04242f6059b867ce6c to your computer and use it in GitHub Desktop.
Multiple Case | Switch
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