1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alex17521 [72]
2 years ago
6

Write a program in c# that simulates the roll of two six sided dice.

Computers and Technology
1 answer:
ruslelena [56]2 years ago
5 0

Answer:

using System;

class Program

{

   public static void Main(string[] args)

   {

       Random rnd = new Random();

       int tries = 0;

       while (true)

       {

           tries++;

           Console.Write("What do you think the total of two six-sided die will be? ");

           int guess = int.Parse(Console.ReadLine());

           int total = rnd.Next(1, 7) + rnd.Next(1, 7);

           Console.Write($"The total was {total}. ");

           if (total == guess)

           {

               Console.WriteLine($"Congratulations! It took you {tries} tries to guess successfully.");

               break;

           }

           else

           {

               Console.WriteLine("Try again!");

           }

       }

   }

}

Explanation:

Worst case you could be guessing forever...

You might be interested in
To be eligible for the leadership training program offered by the office, a student must have at least 2 years of post-secondary
erica [24]

Answer:

The formula for the given problem is:

=IF(OR(D2>=2,G2>"Yes"), "Yes", "No")

Explanation:

Please see attachment for step by step guide

7 0
4 years ago
Although some media critics disagree about the terminology, smartphones and other mobile devices used to watch content originall
GuDViN [60]

Answer:

The correct answer to the following question will be Fourth screens.

Explanation:

In marketing communication and in advertising, fourth screen can be referred to video screen which are small portable such as, smartphones, portable media player and other mobile devices. This type of screen also used to watch those content which are reserved for TV.

Today most of the people use mobile devices for such tasks. Sometimes the third screen also refers for the opening of new possibilities but fourth will widely have used.

Hence, option C is the correct answer.

5 0
4 years ago
Explain word count <br>in ms word Processing​
Mamont248 [21]

Answer:

A word count is a numerical count of how many words a document contains.

Explanation:

Most word processors today can count how many words are in a document for the user.

When you type in a document, Word automatically counts the number of pages and words in your document  and displays them on the status bar at the bottom of the workspace.

Word also counts pages, paragraphs, lines, and characters.

3 0
3 years ago
Which of the following terms is associated with instant messaging?
Lerok [7]
D.

Texting is associated with instant messaging
3 0
3 years ago
Consumer protection laws might result in
elixir [45]
All the above idk fewer tellmarker calls


8 0
3 years ago
Read 2 more answers
Other questions:
  • Which are examples of intrapersonal goals? Check all that apply. Lea plans to finish her next project before the due date. Erick
    12·2 answers
  • Technical colleges offer certification in audio engineering through programs that are normally from 2 to 6 months long. False Tr
    14·1 answer
  • Wats is a internal disk drive​
    10·2 answers
  • The possible states of a process are:
    6·2 answers
  • (1) Prompt the user to enter a string of their choosing. Output the string.
    11·1 answer
  • The language C was originally developed by​
    11·2 answers
  • How does a author develop a character in a story?
    14·2 answers
  • Computers help eliminate that repetitive of manual task. How can this benefit you in in your overall career
    7·2 answers
  • What is the possible output from system.out.println((int)math.random() * 4)?
    8·1 answer
  • Create an application named StudentsStanding.java that allows you to enter student data that consists of an ID number, first nam
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!