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
6 The part of the computer that contains the brain or central processing unit is also known as the ?
Olin [163]
Answer:  "CPU" .
________________________________
4 0
3 years ago
Allie needs to add a long row of numbers. She should enter a
ikadub [295]
I believer the answere is a formula hope this helped
8 0
3 years ago
Read 2 more answers
What is the most significant issue that needs to be addressed when ensuring the proper functioning of a computer?
ycow [4]

Answer:

The most significant issue addressed while ensuring the proper functionality of computer is the working of Operating System.

Explanation:

There are many issues faced while making the computer properly functional. Such as, Memory size, processor speed, software installation etc. while operating system not working properly can cause a significant problem. If operating system is not working properly, the user is unable to use the computer.

So, to make sure the functioning of computer, the significant issue that should be needed to address is Operating System Installation.

7 0
3 years ago
Sonora wants to extend the cells to be added in her formula. What is the quickest way to add more cells?
djyliett [7]

Answer:

D

Explanation: took the test on edge

7 0
3 years ago
Read 2 more answers
In designing input by clinicians for an EHR system, which of the following would be effective for a clinician when the data are
svetoff [14.1K]

Answer:

Speech recognition

Explanation:

Speech recognition would be effective for a clinician when data entry is fairly repetitive and the vocabulary used is fairly limited and over time it as become a replacement for other forms of dictation.

3 0
4 years ago
Other questions:
  • Which string method counts the number of characters in a string?
    5·1 answer
  • True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
    10·1 answer
  • Which group on the sparkline tools design tab would you choose if you wanted to change the data source of the sparkline? (1 poin
    10·1 answer
  • You have just driven to the Hewlett-Packard site in Corvallis to field-interview a programmer. You sit down in a conference room
    6·1 answer
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    12·1 answer
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • What are the advantages of customer relationship managment​
    10·1 answer
  • Que es el sistema persona producto?​
    8·1 answer
  • Define the term visual as used in visual programming
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!