Create a program where a user guesses whether the value of the sum of two dice will be even or odd. The game will stop when the number of turns has reached 5. To guess odd, the user enters 1.  To guess even, the user enters 2.  After each roll, the program should display the two numbers rolled,the sum of the numbers,  the user's guess as "Even" or "Odd" and whether they won or lost.  Once the player ends the game, the program should display the number of times played and the number of turns won and lost and the number of times the dice were even/odd.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 5E: a. Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered...
icon
Related questions
Question

 

Create a program where a user guesses whether the value of the sum of two dice will be even or odd. The game will stop when the number of turns has reached 5. To guess odd, the user enters 1.  To guess even, the user enters 2.  After each roll, the program should display the two numbers rolled,the sum of the numbers,  the user's guess as "Even" or "Odd" and whether they won or lost.  Once the player ends the game, the program should display the number of times played and the number of turns won and lost and the number of times the dice were even/odd.

 

 

Technical Requirements:

  • Must use the random function for each die
  • Use a loop to play the game for 5 turns
  • Use an array to track each roll as to whether it was even or odd

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Block Comments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT