Question
Create a program in C# that has 2 multiple choice questions. 1. Users have two attempts only, show attempt number each time. Hint : while
Create a program in C# that has 2 multiple choice questions. 1. Users have two attempts only, show attempt number each time. Hint: 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. Hint: if...else if...else. 4. User have options to answer the two questions again if first attempt score is not 100%. Hint: if statement. 5. Use string method .ToUpper() to allow users to enter with lowercase or uppercase letters. 1. Where is the capital of France? A. London B. Madrid C. Paris D. Rome Answer: C 2. Where is Spain located? A. Asia B. Europe C. Africa D. South America Answer: B
-------------------------------------------------Output------------------------------------------------------
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__ Wrong user input. Upper or lower case letter allowed.
2. Where is Spain located? A. Asia B. Europe C. Africa D. South America Answer: __d__ Wrong user input. Upper or lower case letter allowed.
Your Score is: 0%
Would you like to try one more time? (Y/N): __n___ User input n to end program. Upper or lower case letter allowed.
Press any key to continue Program ends only if n is selected
Or
Would you like to try one more time? (Y/N): __y__ User input y to continue with second attempt. Upper or lower case letter allowed
Multiple choice questions, select one answer in each question. (Note: You have 2 attempts, attempt 2)
1. Where is the capital of France? A. London B. Madrid C. Paris D. Rome
Answer: __A__ Wrong user input. Upper or lower case letter allowed
2. Where is Spain located? A. Asia B. Europe C. Africa D. South America Answer: __D__ Wrong user input. Upper or lower case letter allowed.
Your Score is: 0%
Press any key to continue Program automatically ends here
(Note: This is another scenario)
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__ Right user input. Upper or lower case letter allowed.
2. Where is Spain located? A. Asia B. Europe C. Africa D. South America Answer: __D__ Wrong user input. Upper or lower case letter allowed.
Your Score is: 50%
Would you like to try one more time? (Y/N): __N___ User input n to end program. Upper or lower case letter allowed.
Press any key to continue Program ends only if n is selected
Or
Would you like to try one more time? (Y/N): __y__ User input y to continue with second attempt. Upper or lower case letter allowed.
Multiple choice questions, select one answer in each question. (Note: You have 2 attempts, attempt 2)
1. Where is the capital of France? A. London B. Madrid C. Paris D. Rome
Answer: __c__ Right user input. Upper or lower case letter allowed.
2. Where is Spain located? A. Asia B. Europe C. Africa D. South America Answer: __B__ Right user input. Upper or lower case letter allowed.
Your Score is: 100%
Press any key to continue Program automatically ends here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started