Answer:
Explanation:
The following code is written in Java and loops through 10 times. Each time generating 2 random dice rolls. If the sum is 10 it breaks the loop and outputs a "You Win" statement. Otherwise, it outputs "You Lose"
import java.util.Random;
class Brainly {
public static void main(String[] args) {
UseRandom useRandom = new UseRandom();
boolean youWin = false;
for (int x = 0; x<10; x++) {
int num1 = useRandom.getRandom(6);
int num2 = useRandom.getRandom(6);
if ((num1 + num2) == 10) {
System.out.println("Number 1: " + num1);
System.out.println("Number 2: " + num2);
System.out.println("You Win");
youWin = true;
break;
}
}
if (youWin == false) {
System.out.println("You Lose");
}
}
}
class UseRandom{
public int getRandom(int n)
{
Random r=new Random();
int rand=r.nextInt(n);
return rand;
}}
<span>If you sort a portion of an Excel sheet and you get an error message such as #DIV/0, the cause of the error message is (B) one or more cells containing absolute cell references. The possible reason of this error message includes: (1) e</span><span>ntering division formula that divided by zero (0), (2) and that is being used as a reference.</span>
Maybe 7411 or someones birthday in the family
<h2>Answer and Explanation:</h2>
The picture shows the right careers with their respective career clusters.
<h2>Answer:</h2>
<u>The correct option is</u><u> (B) hang up and call back using the banks official phone number</u>
<h2>Explanation:</h2>
There are a lot of cases where people pretend to call from the banks where the receivers have the account. The caller tries to take the information from the receiver and pretends to be the bank official. If there is any doubt then the receiver should hang up the call and call back the official number of the bank to confirm that whether somebody has called from the bank to get the information.