Write a script that creates a craps game

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

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6. The script will display each number, and the sum. If the sum is 2, 3, or 12 the user loses. Print an appropriate message. If the sum is 7 or 11 the user wins. Print an appropriate message. If the sum is 4, 5, 6, 8, 9, 10 this becomes the "point". The user will keep "rolling" until they get the point (they win) or 7 (they lose). Print an appropriate message. Once the user has won or lost, ask if the user wants to try again. If so, start the game again. If not, exit. 

Reference no: EM13165481

Questions Cloud

What is the enthalpy of vaporization : A low melting metallic element has a vapor pressure of 28.2 torr at 458. oC. and a vapor pressure of 420. torr at 710. oC. What is the enthalpy of vaporization of this metal in kJ/mol?
Write a program that will represent an axis-aligned : Write a program that will represent an axis-aligned right triangle in the x-y plane as a Class. A right triangle has a right angle (90-degree angle) and two sides adjacent to the right angle, called legs. See http://en.wikipedia.org/wiki/Right_tri..
Effectiveness of an hrd program : Explain the role that trainability plays in the effectiveness of an HRD program or intervention. Briefly describe the options available to assess the trainability of employees
Class sorter which contains methods for selection sort : Write a class Sorter which contains methods for selection sort, insertion sort and bubble sort (start with the code below). Then create a client class which asks user to enter ten numbers using arrays. Then the program asks user which sorting algo..
Write a script that creates a craps game : Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.
Estimate state income tax payments : Estimated state income tax payments of $1,000 each quarter and estimated city income tax payments of $300 each quarter. The Dunphys made all fourth-quarter payments on December 31, 2013. They would like to receive a refund for any overpayments.
Create an array of date objects : Create an array of Date objects of size 4. Initialize the array by using a loop. In the loop, use the Scanner.nextLine() method to input a date as a string, convert it to a date by using the toDate() method, and assign the result to an element in ..
Write a linked-list-based push-down stack implementation : Write a linked-list-based push-down stack implementation that keeps items on the list in order from least recently inserted to most recently inserted. You will need to use a doubly linked list.
Create 3 files date.h, date.cpp, date_main.cpp : create 3 files date.h, date.cpp, date_main.cpp that will create a birth date and a graduation date in the form MM/DD/YYYY

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a c++ program containing a linked list of 10 integer

Write a C++ program containing a linked list of 10 integer numbers. Have the program display the numbers in the list.

  For the employee class make

For the Employee class make sure that no person is underage or too old (less than 16 or greater than 80). Do nothing for the set function if the person's age is out of range.

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  50 element array of integers with random numbers

write a java code to instantiate and initialize a 50 element array of integers with random numbers in the range of 45 through 256 inclusive.

  Define a class called plot that has private members of lengt

Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field.

  Implement a simplified version of the set class

You will implement a simplified version of the set class. You must implement all functions defined in the provided file set.h. You may add other member functions and variables as necessary.

  In psuedocode, design an application

In psuedocode, design an application that has an array of at least 20 integers. It should call a module that uses the sequential search algorithm to locate one of the values

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Write a c function to convert gallons-quarts-pints and cups

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups.

  The knight''s tour problem

The knight's tour problem is as follows: given an initial position for a single knight on an otherwise empty chessboard, find a sequence of 64 moves that will make the knight visit every square on the board exactly once

  Prepare the weighted scoring model for three exams

Prepare the weighted scoring model. Final grades are based on three exams worth 15%, 20%, and 25%, respectively; homework is worth 20%.

  Data from the file grocery.dat

Read the data from the file Grocery.dat and assign values to the 10  GroceryItem  objects. Next display these items to allow a customer to select grocery items from the list and indicate the quantity of that item he or she would like to order. When t..

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