sr

来自「Algorithms for Image Processing and Comp」· 代码 · 共 55 行

TXT
55
字号
@c ----------------------------------------------------------------------
@node srand, random number
@heading @code{srand}
@subheading Syntax

@example
#include <stdlib.h>

void srand(unsigned seed);
@end example

@subheading Description

This function initialized the random number generator (@pxref{rand}). 
Passing the same @var{seed} results in @code{rand} returning predictable
sequences of numbers. 

@subheading Return Value

None.

@subheading Example

@example
srand(45);
@end example

@c ----------------------------------------------------------------------
@node srandom, random number
@heading @code{srandom}
@subheading Syntax

@example
#include <stdlib.h>

void srandom(int seed);
@end example

@subheading Description

This function initialized the random number generator (@pxref{random}). 
Passing the same @var{seed} results in @code{random} returning predictable
sequences of numbers. 

@subheading Return Value

None.

@subheading Example

@example
srandom(45);
@end example

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?