Created
April 4, 2019 23:36
-
-
Save jacobaraujo7/b452a21c875c936a1c9f60517a00344b to your computer and use it in GitHub Desktop.
calculo_idade.dart
This file contains 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
import 'dart:io'; | |
main(){ | |
print("===== Digite uma idade ====="); | |
var input = stdin.readLineSync(); | |
var idade = int.parse(input); | |
if(idade >= 50){ | |
print("melhor idade"); | |
} else if(idade >= 18){ | |
print("adulto"); | |
} else if(idade >= 12){ | |
print("adolecente"); | |
} else { | |
print("criança"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pow, tava quebrando a cabeça por isso, deu certo valew!! mas alguém pode explicar melhor essa questão do Null safety?