Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

computer Science website:sh Question 1: A guessing game that describes as follows: Enter number1. The number to guess Player will guess the number1,...

computer Science

website: cpp.sh

Question 1: A guessing game that describes as follows: 

Enter number1. The number to guess 

Player will guess the number1, and play start to enter the number. 

If player's number is larger than number1, output: "Please enter a smaller number." And let player to enter again. 

If player's number is smaller than number1, output: "Please enter a larger number."And let player to enter again. Otherwise, output: "Congratulations, you won!" And exit the program 

Question 2: Take a user input integer, and print out the digit by digit. (can enter any positive number, e.g. 123, 34567,37,... )(hint: first you need to find the digit of integer, use while loop to find the digit of integer, then look the exercise 6 of lecture 5) 

Example:

Enter an integer: 123456789 

first digit: 1

second digit: 2

...

ninth digit: 9 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question