Chinaunix首页 | 论坛 | 博客
  • 博客访问: 260900
  • 博文数量: 52
  • 博客积分: 1287
  • 博客等级: 少尉
  • 技术积分: 581
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-01 13:53
文章分类

全部博文(52)

文章存档

2012年(48)

2011年(4)

分类: C/C++

2012-01-09 22:05:09

 /**

 * main - 产生随机数

 * @num: 随机数个数

 * @size: 随机数范围0-size

 *

 * 

 * 

 *

 * CONTEXT:

 * Don't care.

 *

 * RETURNS:

 * Pointer to the found partition on success, NULL if not found.

 */

/*/

#include

#include

#include

#include

int

main(){

 

freopen("input.txt","r",stdin);

freopen("output.txt","w",stdout);

 

long i=0,num=0,size=2147483647;

scanf("%d%d",&num,&size);

if(num<=0)return;

 

srand((unsigned)time(NULL));

for(;i

printf(" %d",rand()%size);

}

fclose(stdin);

fclose(stdout);

}

/*/

阅读(1675) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~