#P0019. 猜数字游戏(提交代码题)

猜数字游戏(提交代码题)

1. Description

Write a guess-the-number game.

  • The program will randomly pick a number between 1 and 100
  • The user try to guess the number. Based on user's input, the program will hint "Too Large" or "Too Small"
  • Keep going until the user gets the correct answer. Print how many opportunities the user cost
  • If the user type a number beyond 1~100 range, alert "The target number is between 1 and 100". It will also cost an opportunity.

2. Submission

  • Finish your code in Lecture Note
  • Click the "递交 / Submit" button on the right,paste your code and submit
  • You can ignore the error report after submission (because the teacher didn't set auto-rating for this problem)