Espacios de nombres
Variantes
Acciones

rand

De cppreference.com
< c‎ | numeric‎ | random
Definido en el archivo de encabezado <stdlib.h>
int rand();
Devuelve una distribuida uniformemente pseudo-aleatorio valor integral entre 0 y RAND_MAX (0 y RAND_MAX incluido) .
Original:
Returns a uniformly distributed pseudo-random integral value between 0 and RAND_MAX (0 and RAND_MAX included).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
srand() debe ser llamada antes de cualquier llamada a rand() para inicializar el generador de números aleatorios .
Original:
srand() should be called before any calls to rand() to initialize the random number generator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

(Ninguno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

Pseudo-random valor integral entre 0 y .. RAND_MAX
Original:
Pseudo-random integral value between 0 and RAND_MAX.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

[editar] Ver también

inicializa pseudo-generador de números aleatorios
Original:
initializes pseudo-random number generator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [editar]