Question: C# language Create a simple trivia game. Ask the user three true-false questions, storing their answer into a char variable. Use if statements to determine

C# language

Create a simple trivia game. Ask the user three true-false questions, storing their answer into a char variable. Use if statements to determine if the user is correct or not. Increase a separate score variable for each correct answer they get. The questions should allow both uppercase and lowercase answers.

Example Output

True or False Exam - Enter T(t) or F(f)

Question 1: 'elseif' is a keyword in C#: F

CORRECT! Your score is 1.

Question 2: Algorithms are usually written in C#: t

INCORRECT! Algorithms are language independent!

Question 3: A switch's 'default' handles any unmatched values: x

ERROR! You did not input T or F!

Final Score: 1 of 3

Create a program to ask for and verify an even number. Check to see if the number they entered is in fact even, meaning the number is evenly divisible by 2 (i.e. no remainder).

Example Output

Please enter an even number: 20

Nice!

Please enter an even number: 21

Boo!

Create a program to ask for a divisor, then randomly generate 3 numbers and check each one to see if it is evenly divisible by the divisor. Remember, the Utility.cs file contains a function for getting random numbers.

Create a quote machine. Present the user with a menu of people (living, dead or fictional). Then ask the user to select someone from the menu. Finally, output an appropriate quote based on their selection. Use a switch statement in your code.

Example Output

Quotes on Demand!

--------------------------

1 Mark Twain

2 Jiddu Krishnamurti

3 Graham Priest

--------------------------

Choose wisely: 2

"Constant assertion of belief is an indication of fear." - Jiddu Krishnamurti

Quotes on Demand!

--------------------------

1 Philip J. Fry

2 Bender 'Bending' Rodriguez

3 Hermes Conrad

--------------------------

Choose wisely: 1

"The less fortunate get all the breaks!" Philip J. Fry

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!