Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each of the problems below state the purpose in your own words, specify inpu

ID: 3887097 • Letter: F

Question

For each of the problems below state the purpose in your own words, specify input that is needed, expected output, and the step by step process that will obtain the output from the input (the algorithm). In addition to these 4 items also specify test data that can be used to all the scenarios described for each problem.

Problem 2: Write a process that will generate a random whole number between 1 and 1000 inclusive. Then allow the user to make a guess. When the user’s guess matches the random number output a message stating that the user guessed the number. When the user’s guess does not match the random number, output a message that user’s guess is too low or too high and prompt the user to enter a new guess until the guess matches the random number.

DONT WRITE ACTUAL CODE (C++)

Explanation / Answer

ALGORITHM

step1: initialize randnum = random (1 to 1000)
Step2: while(True)
Step3: Display user to guess a number
Step4: input userGuess
step5: if userGuess == randnum
step6: then display You guesssed the number
Step7: break the loop
step8: else
Step9: if userGuess < randnum
Step10: then display Your guess is low
Step11: else
Step12: display Your guess is high