Question: I need help changing this code from Java to C#. Here are the instructions for the assignment: -change the constant final to a C# code

I need help changing this code from Java to C#.

Here are the instructions for the assignment:

-change the constant final to a C# code final

-replace all print line statements with C# code equilivent

-remove "playAgain = keyboard.next();" and replace this with C# code to get the user input and pass it to the playAgain variable

-declare a random variable below your "playAgain" variable like this: RANDOM rand = new Random ();

-replace both Math.Random() calls in your code with the call to the next Method on the rand variable like this: rand.Next()

-Run the program. What is the bug? Write the answer in a readme text file.

-fix the bug and rerun the program.

/** * Workshop 5 * * This program simulates 10,000 games of craps. * It counts the number of wins and losses and outputs the probability * of winning. * * Created: NA * * @author NA * @version 1 */ public class Craps { private static final int NUM_GAMES = 100;

public static void Main(String[] args) { String playAgain = ""; do{ // Variable declarations int numSevens = 0; int numElevens = 0; int roll = 0; // Play 100 games for (int i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!