Skip to content

Commit

Permalink
Ajuste no método de sorteio
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricioveronez committed Mar 25, 2024
1 parent 6bfdfa5 commit 53a3aa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func main() {
fmt.Println("Sorteando...")
time.Sleep(time.Duration(delay) * time.Second)

numeroSorteado := rand.Intn(numMaximo-1) + 1
numeroSorteado := rand.Intn(numMaximo + 1)
if numeroSorteado == numEscolhido {
fmt.Printf("O valor sorteado foi %d e você escolheu %d. Parabéns !!!\n", numeroSorteado, *escolhido)
fmt.Printf("O valor sorteado foi %d e você escolheu %d. Parabéns !!!\n", numeroSorteado, numEscolhido)
} else {
fmt.Printf("O valor sorteado foi %d e você escolheu %d. Tenta de novo...\n", numeroSorteado, *escolhido)
fmt.Printf("O valor sorteado foi %d e você escolheu %d. Tenta de novo...\n", numeroSorteado, numEscolhido)
os.Exit(1)
}
}

0 comments on commit 53a3aa9

Please sign in to comment.