Stage 7 Now... it's time to allow the player to play more than one game if they wish. Let's add a loop which asks the pl
Posted: Mon May 09, 2022 6:16 am
That C language question, we will get questions as well as
output of code
just we have to write the code of these questions and get these
output above
Stage 7 Now... it's time to allow the player to play more than one game if they wish. Let's add a loop which asks the player whether they wish to play again ('n']. Sample output 1: Would you like to play in-between tyin]? y Die 1: 8 Die 2:9 Number of chips: 100 Place your bet: 10 Not the same, let's play! Die 3: 3 *** Sorry - You lose! *** You now have 90 chips! Play again (yin)? y Die 1: 8 Die 2: 9 Number of chips: 90 Place your bet: 20 Not the same, let's play! Die 3: 10 *** Sorry - You lose! *** You now have 70 chips! Play again tyln]? y Die 1: 2 Die 2: 7 Number of chips: 70 Place your bet: 20 Not the same, let's play! Die 3: 2 *** You hit the post - You lose! *** You now have 50 chips! Play again lyin)? y Die 1: 4 Die 2: 10 Number of chips: 50 Place your bet: 10 Not the same, let's play! Die 3: 5 10 of 24
*** You win! *** You now have 60 chips! Play again lyin]? n Thanks for playing! Sample output 2 Would you like to play in-between ty|n]? y Die 1:1 Die 2: 5 Number of chips: 100 Place your bet: 30 Not the same, let's play! Die 3: 10 *** Sorry - You lose! You now have 70 chips! Play again tyln? y Die 1: 10 Die 2: 10 Even-steven! Let's play again! You now have 70 chips! Play again lyin)? n Thanks for playing!
output of code
just we have to write the code of these questions and get these
output above
Stage 7 Now... it's time to allow the player to play more than one game if they wish. Let's add a loop which asks the player whether they wish to play again ('n']. Sample output 1: Would you like to play in-between tyin]? y Die 1: 8 Die 2:9 Number of chips: 100 Place your bet: 10 Not the same, let's play! Die 3: 3 *** Sorry - You lose! *** You now have 90 chips! Play again (yin)? y Die 1: 8 Die 2: 9 Number of chips: 90 Place your bet: 20 Not the same, let's play! Die 3: 10 *** Sorry - You lose! *** You now have 70 chips! Play again tyln]? y Die 1: 2 Die 2: 7 Number of chips: 70 Place your bet: 20 Not the same, let's play! Die 3: 2 *** You hit the post - You lose! *** You now have 50 chips! Play again lyin)? y Die 1: 4 Die 2: 10 Number of chips: 50 Place your bet: 10 Not the same, let's play! Die 3: 5 10 of 24
*** You win! *** You now have 60 chips! Play again lyin]? n Thanks for playing! Sample output 2 Would you like to play in-between ty|n]? y Die 1:1 Die 2: 5 Number of chips: 100 Place your bet: 30 Not the same, let's play! Die 3: 10 *** Sorry - You lose! You now have 70 chips! Play again tyln? y Die 1: 10 Die 2: 10 Even-steven! Let's play again! You now have 70 chips! Play again lyin)? n Thanks for playing!