Espaços nominais
Variantes
Acções

rand

Da cppreference.com
< c‎ | numeric‎ | random

Definido no cabeçalho <stdlib.h>
int rand();
Retorna uma distribuído uniformemente valor pseudo-aleatório integral entre 0 e RAND_MAX (0 e RAND_MAX incluído).
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() deve ser chamado antes de quaisquer chamadas para rand() para inicializar o gerador de números aleatórios.
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.

Índice

[editar]Parâmetros

(Nenhum)
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-aleatório valor integral entre 0 e 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]Exemplo

[editar]Veja também

inicializa pseudo-aleatórios gerador de números
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.

(função)[edit]
close