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

  Program that read in from the key board a string

Write a complete C++ program that read in from the key board a string and convert all letters in the string to upper cases. You are not allowed to use toupper function.

  Asks the user for the name of an input file and translates

Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your  main  function should be responsible for reading the input file and coordinating calls to a value-returning functio..

  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

  Throws an exception from a deeply nested

Write a program that throws an exception from a deeply nested function and still has the catch handler following the try block enclosing the initial call in main catch the exception

  Build a traffic light system - microcontroller system

Build the whole system with 3 RAG units and three puffin crossing units and build a team to work on this mini-project, be careful in selecting your team member.

  Create a 1-dimensional (1d) array

Write a program to create a 1-dimensional (1D) array that contains 15 characters and display to the screen a count of the occurrences of each of the vowels a, e, i, o, and u in the array.

  Program that reads in the average monthly

Write a program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. The program then prints out a nicely formatted table showing the rainfa..

  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.

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Initialize an array and fill the array with the gpa values.

Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Write a program in which the user is prompted

Write a program in which the user is prompted for the number of values that they will be entering. The user then enters that number of integers into an array

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