摘要: #include #include #include main( ){ int i; int a,b,c,e,g,f,j; int k,d,h; float u,v; char p; int count=0; srand( (unsigned in... 阅读全文
posted @ 2015-04-03 22:36 50-陈江焕 阅读(109) 评论(2) 推荐(0)
摘要: #include #include #include main( ){ int i; int a,b,c,d,e; int count=0; srand( (unsigned)time( NULL ) ); for(i=1;i<31;i++) { a=rand()%10+1; ... 阅读全文
posted @ 2015-03-31 17:05 50-陈江焕 阅读(111) 评论(3) 推荐(0)
摘要: 心得: 在编程过程中遇到的最大的问题就是随机数的产生问题。在c语言中函数rand()可以用来产生随机数,但是它缺不是一个真正的随机数,需要用到srand()函数。所以我用srand( (unsigned)time( NULL ) )这段代码来解决随机数的产生问题。rand()的随机范围在0到3276... 阅读全文
posted @ 2015-03-25 19:46 50-陈江焕 阅读(169) 评论(3) 推荐(0)