Display the total as the number of points earned

Assignment Help C/C++ Programming
Reference no: EM132076032

You need help with the following progra

Write a C++ program to simulate the following game:

1. The player has two dice to roll.

2. The numbers that are rolled on the sum (Sum1) is checked to see if it is even or odd.

3. If Sum1 is even, then the player gets one more chance to roll the dice.

a. After the player rolls the dice, the sum is generated again. Let us call it Sum2.

b. Now Sum2 is added with Sum1 and the total is checked to see if it is even or odd.

i. If Even, the player won the game. Display appropriate message and display the total (Sum1+Sum2) as the Number of points earned.

ii. If Odd, the player lost the game. Display appropriate message. (Do not have to display points/total)

4. If Sum1 is odd, the player lost the game. Display appropriate message. (Do not have to display points/ total)

The player can repeat this game any number of times. Ask a player if he wants to play the game again. If yes, repeat, else stop.

(Hint: Can use 'y' or 'Y' to represent yes and 'n' or 'N' to represent No.)

Reference no: EM132076032

Questions Cloud

Write a program that reads an unspecified number : Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read.
Explain the concept of patient-centered medical home : Explain the concept of patient-centered medical home (PCMH) to your Uncle and how it will improve the health care he receives.
Calculate the total cost of material : Orr Company makes and sells a single product called a Bik. Calculate the total cost of material A budgeted to be purchased in March
What do you think were the challenges faced by coco cola : What do you think were the challenges faced by Coco Cola when they attempted to enter the Indian market the first time? What did they do wrong?
Display the total as the number of points earned : If Even, the player won the game. Display appropriate message and display the total (Sum1+Sum2) as the Number of points earned.
Produces several lines of oak furniture : Oakmaster furniture inc. produces several lines of oak furniture,ranging from traditional to contemporary.
Write a shell script that copies the file named by its first : Write a script that tests for at least 1 or more arguments in the line calling the script. Write a shell script that copies the file named by its first argument
Create a java class named circle that implements java : Create a Java class named "Circle" that implements java.io.Serializable interface and models a circle based on radius.
Determine barry and connies lowest taxable income : Connie sold for $40,000 property she had inherited from her father in 2010. Determine Barry and Connies lowest taxable income

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd