Compare commits
11 Commits
a55499bf40
...
davi
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bd912345c | |||
| fd08173ed1 | |||
| b026cab53a | |||
| eb233b499d | |||
| 6f3c186b36 | |||
| 4cf64a0479 | |||
| 5de595864c | |||
| 722d9a5fe1 | |||
| 0ab7def81d | |||
| 439bd0caf2 | |||
| 87d6028414 |
@@ -16,6 +16,7 @@ func main() {
|
||||
fmt.Println("Bem-vindo ao jogo de adivinhação!")
|
||||
fmt.Printf("Você tem %d tentativas para adivinhar o número entre 1 e 10.\n", TENTATIVAS)
|
||||
|
||||
// inicializando variável de tentativa
|
||||
tentativa := 0
|
||||
|
||||
for tentativa < TENTATIVAS {
|
||||
@@ -30,7 +31,7 @@ func main() {
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("Deve ser informado um número.")
|
||||
continue // colocado para pular a proxima iteração e não contar a tentativa
|
||||
continue
|
||||
}
|
||||
|
||||
switch {
|
||||
@@ -44,4 +45,5 @@ func main() {
|
||||
|
||||
tentativa++
|
||||
}
|
||||
// comentario do Davi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user