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
Fynjy0 [20]
3 years ago
10

12. Realizar un algoritmo que genere un número aleatorio, el usuario debe adivinar cual es el número generado para esto tendrá 3

turnos
Computers and Technology
1 answer:
skelet666 [1.2K]3 years ago
3 0

Answer:

Explanation:

El siguiente algoritmo esta escrito en Java y genera un numero aleatorio. Despues le pide al usario que intente adivinar el numero. Si el usario adivina correctamente entoces le dice que fue correcto y termina el programa. Si no adivina bien entonces dice Incorrecto y le pide otra adivinanza al usario hasta llegar a la tercera adivinanza y se termina el programa.

import java.util.Random;

import java.util.Scanner;

class Brainly{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       Random ran = new Random();

       int numero = ran.nextInt(20);

       for (int x = 0; x <= 2; x++) {

           System.out.println("Adivina el numero entre 0 y 20: ");

           int respuesta = in.nextInt();

           if (respuesta == numero) {

               System.out.println("Correcto");

               break;

           } else {

               System.out.println("Incorrecto");

           }

       }

   }

}

You might be interested in
Withdrawal from a conflict is best used when ______.
Liono4ka [1.6K]

Answer:

Neither side can reach an agreement

Explanation:

i just took the test

6 0
3 years ago
Read 2 more answers
1. Write the full forms of the following.
motikmotik

Answer:

  1. Language of Graphic Oriented
  2. Initial Public Offering
  3. Control Unit
  4. Central Processing Unit

  • False
  • True
  • False
  • True

  1. Versatility
  2. Smartphone
  3. All of the above
6 0
3 years ago
Read 2 more answers
Topic: Video Games.
Butoxors [25]

Answer:

Fire Emblem

Explanation:

4 0
3 years ago
How do I change the keyboard light colors on Alienware 17 R5?
aleksandrvk [35]

Answer:

5 Launch the Alienware Control Center Press FN + F4 Launches the Alienware Control Center and opens the Theme Manager tab. Keyboard- backlight adjustment Press FN + F5 Press FN + F6 FN + F5 decreases the keyboard-backlight intensity. FN + F6 increases the keyboard-backlight intensity.

Explanation:

Nice Durango

3 0
3 years ago
What is phishing?
alexira [117]

Answer:

Phishing is the malicious act of keeping a false website or sending a false e-mail with the intent of masquerading as a trustworthy entity in order to acquire sensitive information such as usernames, passwords, and credit card details.

Therefore, the answer to the question is option C.

7 0
3 years ago
Other questions:
  • Coretta is thinking about which careers she would enjoy. She considers her personal skills and interests. She enjoys reading and
    13·2 answers
  • Cable television systems originated with the invention of a particular component. What was this component called?​
    9·1 answer
  • Select the correct statement(s) regarding CENTREX. a. CENTREX systems reside at the service providers central office, however, t
    11·1 answer
  • You need to design a backup strategy. You need to ensure that all servers are backed up every Friday night and a complete copy o
    6·1 answer
  • Which criterion can be used to select the appropriate type of network media for a network?
    8·1 answer
  • Match the component to its function. resistor inductor capacitor battery transistor This component stores a temporary charge. ar
    7·2 answers
  • 2. What is software conflict?<br>​
    11·1 answer
  • What is computer system<br>explain the role of bank in computer<br>​
    15·2 answers
  • By dividing the control plane from the data plane, SDN offers the flexibility to view the entire data plane infrastructure as a
    11·2 answers
  • NEED HELP ASAP!!!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!