C program Create a dice game that uses two six‐sided dice. Each time the program runs, use random numbers to assign values to each die variable. Output a “player wins” message to the user if the sum of the two dice is 7 or 11. Otherwise, output the sum of the two dice and thank the user for playing.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

C program

Create a dice game that uses two six‐sided dice. Each time the program runs, use random numbers to assign values to each die variable. Output a “player wins” message to the user if the sum of the two dice is 7 or 11. Otherwise, output the sum of the two dice and thank the user for playing.  

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Algebraic Expressions
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT