Menu

Use C Got Namespace Consoleapp1 Class Program Static Void Main String Args Consolewritelin Q43883942

Use C# Hey! Welcome to Tinas Dice Game Lets start! Hey! Welcome to Tinas Dice Game Lets start! Dice 1 = 4 Dice 2 = 2 Dice 1 = 1

here is what I got:

namespace ConsoleApp1
{
   class Program
   {
       static void Main(string[]args)
       {
          Console.WriteLine(“Hey! Welcome to Tina’s Dice Game.”);
          Console.WriteLine(“Let’s start!”);
          Console.WriteLine();

           int count =1;
           int Dice1; //variables
           int Dice2; //variables
           Random random =new Random(); // set up a random number
           Dice1 =random.Next(1, 7); // random number from 1 to 6
           Dice2 =random.Next(1, 7); // random number from 1 to 6

          Console.WriteLine(“I got ” + Dice1 + ” and ” + Dice2 + “!”);

           if ((Dice1 +Dice2) % 2 != 0) // if the numbers are odd
           {
              Console.WriteLine(“Odd are still cool!”);
           }
           else // if thenumbers are not odd
           {
              Console.WriteLine(“Evens are better thanodds!”);
           }
          Console.WriteLine(“Do you want to play again?”);
           String answer =Console.ReadLine();

           while (answer== “YES”)
           {

           }
       }
   }

}

Hey! Welcome to Tina’s Dice Game Let’s start! Hey! Welcome to Tina’s Dice Game Let’s start! Dice 1 = 4 Dice 2 = 2 Dice 1 = 1 Dice 2 = 3 I got 4 and 2! Evens are better than odds! I got 1 and 3! Evens are better than odds! The Task: Do you want to play again? YES Do you want to play again? YES I want to play a game: • • Dice 1 = 3 Dice 2 = 3 Dice 1 = 5 Dice 2 = 2 I got 3 and 3! Evens are better than odds! I got 5 and 2! Odds are still cool! • • Do you want to play again? YES The number of times the dice was thrown is: 2 Nice game! Thanks for playing, Come play again soon! Dice 1 = 3 Dice 2 = 2 I have 2 die. 6 sided each I start the game and print the intro o “Hey! Welcome to Tina’s Dice Game.” O “Let’s start!” The computer randomly generates what side of the die is chosen (for each die) I then add both of the random numbers together y I then print o Dice 1 = (the random number I got) o Dice 2 = (the random number I got) Depending on what number I get, something different is printed to the screen o If I get an even number . I print “I got (value of dice 1) and (value of dice 2)!” I print “Evens are better than odds!” o If I get an odd number . I print “I got (value of dice 1) and (value of dice 2)!” . I print “Odds are still cool!” At the end, I ask the user if they want to play again o If the answer is “YES” . I “throw the die again and repeat the printing process o If the answer is anything but YES (case-sensitive) . I end the game and print the outro o “The number of times the dice was thrown is: (value of times dice is thrown)” o “Nice game!” o “Thanks for playing, Come play again soon!” I got 3 and 2! Odds are still cool! Hey! Welcome to Tina’s Dice Game Let’s start! Do you want to play again? YES • Dice 1 = 5 Dice 2 = 6 Dice 1 = 4 Dice 2 = 5 I got 5 and 6! Odds are still cool! I got 4 and 5! Odds are still cool! Do you want to play again? Nah Do you want to play again? Whhhh… I am not really interested anymore What You Need to Do: The number of times the dice was thrown is: 1 Nice game! Thanks for playing, Come play again soon! The number of times the dice was thrown is: 4 Nice game! Thanks for playing, Come play again soon! Implement the code so that the output produced follows as below: I have included a few examples: age 2 of 3 557 words English (United States) — – + 1009 Show transcribed image text Hey! Welcome to Tina’s Dice Game Let’s start! Hey! Welcome to Tina’s Dice Game Let’s start! Dice 1 = 4 Dice 2 = 2 Dice 1 = 1 Dice 2 = 3 I got 4 and 2! Evens are better than odds! I got 1 and 3! Evens are better than odds! The Task: Do you want to play again? YES Do you want to play again? YES I want to play a game: • • Dice 1 = 3 Dice 2 = 3 Dice 1 = 5 Dice 2 = 2 I got 3 and 3! Evens are better than odds! I got 5 and 2! Odds are still cool! • • Do you want to play again? YES The number of times the dice was thrown is: 2 Nice game! Thanks for playing, Come play again soon! Dice 1 = 3 Dice 2 = 2 I have 2 die. 6 sided each I start the game and print the intro o “Hey! Welcome to Tina’s Dice Game.” O “Let’s start!” The computer randomly generates what side of the die is chosen (for each die) I then add both of the random numbers together y I then print o Dice 1 = (the random number I got) o Dice 2 = (the random number I got) Depending on what number I get, something different is printed to the screen o If I get an even number . I print “I got (value of dice 1) and (value of dice 2)!” I print “Evens are better than odds!” o If I get an odd number . I print “I got (value of dice 1) and (value of dice 2)!” . I print “Odds are still cool!” At the end, I ask the user if they want to play again o If the answer is “YES” . I “throw the die again and repeat the printing process o If the answer is anything but YES (case-sensitive) . I end the game and print the outro o “The number of times the dice was thrown is: (value of times dice is thrown)” o “Nice game!” o “Thanks for playing, Come play again soon!” I got 3 and 2! Odds are still cool! Hey! Welcome to Tina’s Dice Game Let’s start! Do you want to play again? YES • Dice 1 = 5 Dice 2 = 6 Dice 1 = 4 Dice 2 = 5 I got 5 and 6! Odds are still cool! I got 4 and 5! Odds are still cool! Do you want to play again? Nah Do you want to play again? Whhhh… I am not really interested anymore What You Need to Do: The number of times the dice was thrown is: 1 Nice game! Thanks for playing, Come play again soon! The number of times the dice was thrown is: 4 Nice game! Thanks for playing, Come play again soon! Implement the code so that the output produced follows as below: I have included a few examples: age 2 of 3 557 words English (United States) — – + 1009

Expert Answer


Answer to Use C# here is what I got: namespace ConsoleApp1 { class Program { static void Main(string[] args) { Console.WriteLine(“…

OR