ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 08 May 2017 My Price 9.00

The first player to score 100 or more points wins

Each turn, a player repeatedly rolls a die until either a 1 is rolled or the player decides to "hold":

  • If the player rolls a 1, they score nothing and it becomes the next player's turn.
  • If the player rolls any other number, it is added to their turn total and the player's turn continues.
  • If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn.

The first player to score 100 or more points wins.

For example, the first player, Ann, begins a turn with a roll of 5. Ann could hold and score 5 points, but chooses to roll again. Ann rolls a 2, and could hold with a turn total of 7 points, but chooses to roll again. Ann rolls a 1, and must end her turn without scoring. The next player, Bob, rolls the sequence 4-5-3-5-5, after which he chooses to hold, and adds his turn total of 22 points to his score.

Create this game incorporate the previous project into the program.

The previous project is attached below and must run with no errors with "C" language.

 

#include <stdio.h>#include <stdlib.h>#include <time.h>int main(void){int i;printf("Press Enter to Roll The Dice\n ");getchar();{srand(time(0));int d = 1 + rand() % 6;if(d==1){printf("___________\n\n");printf("||\n");printf("|0|\n");printf("||\n");printf("___________\n");}if(d==2){printf("___________\n\n");printf("||\n");printf("|00|\n");printf("||\n");printf("___________\n");}if (d== 3){printf("___________\n\n");printf("|0|\n");printf("|0|\n");printf("|0|\n");printf("___________\n");}if (d== 4){printf("___________\n\n");printf("|00|\n");printf("||\n");printf("|00|\n");printf("___________\n");}if (d== 5){printf("___________\n\n");printf("|00|\n");printf("|0|\n");printf("|00|\n");printf("___________\n");}if (d== 6){printf("___________\n\n");printf("|00|\n");printf("|00|\n");printf("|00|\n");printf("___________\n");}return 0;}}

Answers

(11)
Status NEW Posted 08 May 2017 01:05 AM My Price 9.00

-----------

Attachments

file 1494207508-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)