Icon New game New game

Número Aleatorio en Java

Fill in the Blanks

(29)
Generar un número aleatorio o al azar y compararlo con un número ingresado.

Download the paper version to play

Recommended age: 17 years old
62 times made

Created by

Guatemala

Top 10 results

  1. 1
    Wendy González 5SB
    Wendy González 5SB
    00:58
    time
    100
    score
  2. 2
    01:02
    time
    100
    score
  3. 3
    Pamela López
    Pamela López
    01:19
    time
    100
    score
  4. 4
    Mynor Rivas 5B
    Mynor Rivas 5B
    01:19
    time
    100
    score
  5. 5
    01:43
    time
    100
    score
  6. 6
    Eunice Ajpop 5BC
    Eunice Ajpop 5BC
    02:00
    time
    100
    score
  7. 7
    02:08
    time
    100
    score
  8. 8
    02:12
    time
    100
    score
  9. 9
    Katherine Palencia
    Katherine Palencia
    02:34
    time
    100
    score
  10. 10
    Maria Matheu 5b
    Maria Matheu 5b
    02:47
    time
    100
    score
Do you want to stay in the Top 10 of this game? to identify yourself.
Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

  1. time
    score
  1. time
    score
time
score
time
score
 
game-icon

Fill in the Blanks

Número Aleatorio en JavaOnline version

Generar un número aleatorio o al azar y compararlo con un número ingresado.

by Isaías A. Cuá Dubón
1

. . Scanner ;
Numero_Aleatorio {

void main ( String [ ] args ) {
/ / Creamos el objeto Scanner llamado sc
Scanner = Scanner ( System . in ) ;
/ / Declaramos nuestras variables de uso
nombre ;
n ;
int ni ;
/ / Aquí se genera el número aleatorio
n = ( ( int ) ( Math . random ( ) * 10 + 1 ) ) ;
. out . println ( " Ingrese su nombre : " ) ;
nombre = sc . ( ) ;
System . out . ( " Adivina el número generado entre 1 y 10 : " ) ;
ni = sc . ( ) ;
/ / Esta es la estructura que evalúa los números aleatorios
( n = = ni ) {
System . . println ( " Felicidades ! ! " + nombre + " acertaste " ) ;
}
{
. out . println ( + " Lo sentimos el número generado es : " + n ) ;
}
. out . println ( " Fin del programa " ) ;
System . out . ( " Programa desarrollado por : Prof . Isaías A . Cuá Dubón " ) ;
}

}

educaplay suscripción