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

QUESTION

" C++ programming. "I need to modified the program that the player who picks up the last sticks or sticks wins.

"C++ programming..."I need to modified the program that the player who picks up the last sticks or sticks wins.the program was already created however I need to make some change as follow the instruction below 1-4.please helpplease help I have hard time to solving it.I attached the file please look.Your program cannot use file level variables or constants; your program cannot use global variables or constants. The functions that you write exchange data by means of return statements and value parameters and reference parameters only.1. Change the pickUpSticks program so that the player who picks up the last sticks or sticks wins.2. Write a parameterized function that plays the game. You must determine the function’s parameters.3. Write a Boolean function that has one string parameter and returns true if the user enters “Y”, “YE” or “YES” and false otherwise. Use the trim and toupper functions to edit the user’s input string. Use the function to determine whether the player plays the game. For example,answer = readAnswer(prompt)while answer is trueplay gameanswer = readAnswer(prompt)end while4. Write a void function that reads the game’s parameters from a file. The function validates the parameters. If the parameters are “bad” the function assigns default values to the parameters. What is a “bad” parameter? If the maximum number of sticks the player can pick up is 3 and the initial number of sticks is 16 then the first player may lose. “16” is a bad parameter. We want the first player to win as long as the player makes no mistakes. The function returns the validated parameters. The parameters are reference parameters." I attached file please look

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