subject

Write a C++ 17 program which generates a random 4 digit number, and then makes the user guess what the number is, while giving the user clues about they numbers they guess. 1. Create an array that holds 4 elements

2. Use a method to fill the array with four RANDOM single-digit numbers

3. Create an array the length of four

4. Use a method to fill the array with the guess the user makes

5. Use a method to compare the tow arrays and return a string where each character in the string is one of the following:

- if the guessed number is in the right spot, display the number

- If the guessed number is the secret/hidden number, display a PLUS sign (+)

- If it's wrong, display a star/asterisk (*)

6. Keep asking for a guess input until the user makes a correct guess.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
In my email i got a message it says a quick message and in message details on who its from its says nicole and under nicole is [email protected] -
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
You know the right answer?
Write a C++ 17 program which generates a random 4 digit number, and then makes the user guess what t...
Questions
question
Mathematics, 06.11.2020 06:00
question
Mathematics, 06.11.2020 06:00
question
Mathematics, 06.11.2020 06:00
question
Mathematics, 06.11.2020 06:00
question
English, 06.11.2020 06:00
Questions on the website: 13722361