Hi @Trupti1
Welcome to UiPath
Try below easy steps.
- Assign →
randomNumber = new Random().Next(1, 11) - Assign →
userGuess = 0 - Do While (userGuess <> randomNumber)
- Input Dialog →
"Guess a number between 1-10"→ Store inuserInput - Assign →
userGuess = CInt(userInput) - If (userGuess < randomNumber) → Message Box
"Too low! Try again." - ElseIf (userGuess > randomNumber) → Message Box
"Too high! Try again."
- Input Dialog →
- Message Box →
"Congratulations! You guessed the right number."
if you found helpful mark as a solution.