【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.16.1.14 rand
Contents
Description
The rand function returns a pseudorandom integer in the range 0 to RAND_MAX.
Syntax
int rand( )
Parameters
Return
The rand returns a pseudorandom number.
Examples
EX1
//This program seeds the random-number generator. int test_rand() { int nn1, nn2; nn1 = rand(); out_int("rand()=", nn1); nn2 = rand(); out_int("rand()=", nn2); return 1; }
Remark
See Also
Header to Include
origin.h