摘要:
The rand() function returns a pseudo-random integer in the range 0 to RAND_MAX inclusive.(来自man手册)1 #include <stdio.h>2 #include <stdlib.h>3 #include <time.h>4 int main (void)5 {6 srand(time(NULL));7 printf("%d\n", 2*(rand () % 25000));8 return 0;9 } 阅读全文