Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- int numeroTestado = 18;
- print(geraIndice(numeroTestado));
- }
- int geraIndice(int numero) {
- if(numero % 2 == 0) {
- return 0;
- } else if (numero % 3 == 0) {
- return 1;
- } else {
- return 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement