Question: Create a program in C# that has 2 multiple choice questions. ALL the following requirements must be included: 1. Users have 2 attempts only ,
Create a program in C# that has 2 multiple choice questions.
ALL the following requirements must be included: 1. Users have 2 attempts only, show attempt number each time. Use while loop with break control. 2. Only one correct answer for each question, use switch case for each question. 3. Show total score after the two questions are answered. Use if...else if...else. The program must show the porcentage obtained in a scale from 0% to 100% AFTER the 2 questions have been answered. 4. User have options to answer the two questions again if first attempt score is not 100%. Use if statement.
6. Use string method .ToUpper() to allow users to enter with lowercase or uppercase letters for the answers.
-------------------------------------------------Output Scenario 1 ------------------------------------------------------
Multiple choice questions, select one answer in each question. (Note: You have 2 attempts, ATTEMPT :1)
1. Where is the capital of France? A. London B. Madrid C. Paris D. Rome
Answer: __d__ (Note: Wrong user input. Upper or lower case letter allowed.)
Your Score is: 0%
Would you like to try one more time? (Y/N): __n___ (Note:User input n to end program. Upper or lower case letter allowed.)
Press any key to continue (Note: Program ends only if n is selected)
(If user selects 'yes' then proceed with 'Attempt:2'. Then, show score and end program. Remember, there are only 2 attempts available).
--------------------------Output Scenario 2-------------------------------------------------------------------------
Multiple choice questions, select one answer in each question. (Note: You have 2 attempts, ATTEMPT :1)
1. Where is the capital of France? A. London B. Madrid C. Paris D. Rome
Answer: __c__ (Note: Correct user input. Upper or lower case letter allowed.)
Your Score is: 100%
Press any key to continue...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
