Question: Write a program that will have a user guess whether a person is a musician or a writer. You will create a group of four
Write a program that will have a user guess whether a person is a musician or a writer. You will create a group of four names, two musicians and two writers, and show the user a name randomly selected from the four. The user will then guess whether they think the name belongs to a musician or writer. After a guess, the program will tell the user whether they are correct, repeat the name, and reveal the correct answer.
Tasks
- The program needs to contain the following
- A comment header containing your name and a brief description of the program
- At least 5 comments besides the comment header explaining what your code does
- Four string variables, two musicians and two writers
- A way to randomly display one of the four names to the user
- Output asking the user whether the name displayed is a musician or a writer
- If the user guesses correctly, congratulate them before outputting the displayed name and the correct answer
- If the user guesses incorrectly, output the displayed name and the correct answer
Please code in C#
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
